Re: InsertXml - not getting the same result as opening xml file



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
>
>


.



Relevant Pages

  • Viewing XML
    ... When I try to view the content of an XML file using WML (as in after the ... appropriate changes in the headers made)-it gives me errors because the ... XML is not properly formed. ...
    (perl.beginners)
  • Re: xml in plain text file on heavy load.
    ... even if the XML file is magically and perfectly ... I want to emphasize that IIS would never be caching that XML file on its own ... Application is NOT synchronizing access to your ASP pages. ...
    (microsoft.public.inetserver.iis)
  • Re: TAPI 3.0 call attached data
    ... The format of the Call Attached Data is XML. ... XML file with CallAttchedData represents one or multiple data lists ... Root element is CallAttachedData. ... version CDATA #FIXED "1.0" ...
    (microsoft.public.win32.programmer.tapi)
  • Re: Wanted:MAIL.MAI structure definition
    ... exports using XML. ... SMTP mail and all the software out there which processes RFC-compliant headers ... I would maintain that to store mail messages you would need to use CLOB ... Every mail message arriving into an OpenVMS system gets its format converted. ...
    (comp.os.vms)
  • Re: XML parser and writer
    ... them on a calendar. ... Therefore I will need to both easily parse and write new XML files. ... why not some database technology? ... an advanced user can edit the XML file directly at ...
    (comp.lang.java.programmer)

Loading