Re: InsertXml - not getting the same result as opening xml file
- From: "hayrob" <straiton@xxxxxxxxxxxxx>
- Date: Tue, 31 May 2005 07:18:01 +0100
Thanks Klaus
You are right about need to be careful with Sections when formatting
Headers!
I will make a suggestion to MS along the lines you have suggested.
Thanks again for your help and interest.
"Klaus Linke" <info@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:uoeAjJTZFHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
Word's object model doesn't really allow for this. You can only have one one
set of styles. And regarding page layout and headers/footers, you have to be
very careful about section breaks, and may need to insert one before you
insert the XML file:
http://www.word.mvps.org/faqs/formatting/WorkWithSections.htm
I've seen it requested that there should be a kind of "binder" mechanism
that just lets you put together different kinds of documents (based on
different templates...), just putting one in the middle of another, keeping
their original look. Maybe you could make a suggestion to Microsoft along
these lines.
It just isn't something really feasible in Word right now. You can get close
by renaming all the (built-in?) styles in the XML file you insert, and
carefully managing the sections of the original and inserted doc, but it's
hard work.
Regards,
Klaus
"hayrob" <straiton@xxxxxxxxxxxxx> wrote:
> Klaus
>
> I see what you are getting at, I think. I have created a new document
> using
> a template which contains the headers and footers, section structure etc
> that I use, then inserted the XML and I get the result I expected.
>
> I'm left puzzled though. I thought if you supplied the complete document
> content as you do with InsertXml, then all the information needed for Word
> to render the document correctly was in the Word XML. Is it the case that
> the previous settings ( layout, headers etc) are still applied even though
> they are not referenced in the WordXml. When I save the Document which is
> not being rendered correctly, the XML looks OK, but when I reopen the
> document it is still not rendered correctly!. Or is there a way to force
> Word to "start again" with the document with the new Xml?
>
>
> "Klaus Linke" <info@xxxxxxxxxxxxxxxxxxxx> wrote in message
> news:uWAV75KYFHA.1092@xxxxxxxxxxxxxxxxxxxxxxx
> "hayrob" <straiton@xxxxxxxxxxxxx> wrote:
>>I have an Word Document stored in an xml file. When I open the
>> document using word, I get the result I expect.
>> When I start Word, add a new blank document, use InsertXML to insert
>> the Xml in my Word file, the Word document does not look the same.
>> Is there a trick I am missing here?
>
>
>
> Hi,
>
> If you open the WordML file, it'll be formatted with the styles from that
> file.
>
> If you insert it in some Word document, it'll be formatted with the styles
> of that document.
>
> Same for page layout, headers and footers, option settings that might
> affect
> the layout, ...
>
> Regards,
> Klaus
>
>
.
- References:
- InsertXml - not getting the same result as opening xml file
- From: hayrob
- Re: InsertXml - not getting the same result as opening xml file
- From: Klaus Linke
- Re: InsertXml - not getting the same result as opening xml file
- From: hayrob
- Re: InsertXml - not getting the same result as opening xml file
- From: Klaus Linke
- InsertXml - not getting the same result as opening xml file
- Prev by Date: Re: "cann't find project or lib" error
- Next by Date: Event handling in VBA
- Previous by thread: Re: InsertXml - not getting the same result as opening xml file
- Next by thread: Can I run an .exe from VBA?
- Index(es):
Relevant Pages
|
Loading