none
how to find dynamic data in header and footer RRS feed

  • Question

  • hello everyone,

    I have a problem in finding the dynamic data inside fields in header and footer sections.

    For example the page number or date time data.

    can anyone tell me what to look at in word specification.

     

    Thank you,

    rana123.

    Tuesday, December 7, 2010 11:10 AM

Answers

  • Rana123, Tony’s response is correct.  MS-DOC is a flow-based format in the same sense that HTML is.  In an HTML file, you don’t know where any particular <p> element should be displayed without laying out all of the content before it.  MS-DOC is the same way.

    The result of any field, including the PAGE field in a header, is only whatever it was last time an application (Word or something else) calculated that field’s result.  For PAGE fields in the header, this will likely be whichever page Word laid out last before the file was saved.


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Thursday, December 16, 2010 8:38 PM
    Moderator

All replies

  • Hi Rana, thanks for your post regarding the [MS-DOC] specification. One of my colleagues in the Open Specification Documentation team will be in touch with you shortly.

    Regards,
    Bill Wesse, Escalation Engineer, US-CSS DSC Protocol Team

    Tuesday, December 7, 2010 12:17 PM
  • Rana123, the information that you are looking for is stored in the header document.  Please take a look at MS-DOC section 2.3.3 - Headers

     

    You also might find the Microsoft Office Visualization Tool useful. It can be downloaded from here. http://go.microsoft.com/fwlink/?LinkId=158791


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Wednesday, December 8, 2010 4:32 PM
    Moderator
  • hi josh,

     

    Thank you for providing the links. I have extracted footer details from the word document and

    the page field is given by '0x13"PAGE   \* MERGEFORMAT "0x14"29"0x15' where 29 is the page 

    number of the last page. The problem is it doesn't provide details about the other page number

    details. so how can I find the other page number details when it is dynamically changing.

    There is only odd footer,even footer and first footer in the ms-doc reference. So the data is

    static there in the above footers, common to all footers. Also I presume it is same for other

    types of field that are inserted. can you please help me with this?

     

    Thank you,

    rana123.

    Thursday, December 9, 2010 6:56 AM
  • Individual page headers and footers are not held within the document; the single instance is all you will find. Also Word is not Page-based and you cannot determine page layouts from the underlying file without a lot of work, essentially duplicating what the Word application itself does.
     

    Enjoy,
    Tony
    www.WordArticles.com
    Thursday, December 9, 2010 9:44 AM
  • Rana123, Tony’s response is correct.  MS-DOC is a flow-based format in the same sense that HTML is.  In an HTML file, you don’t know where any particular <p> element should be displayed without laying out all of the content before it.  MS-DOC is the same way.

    The result of any field, including the PAGE field in a header, is only whatever it was last time an application (Word or something else) calculated that field’s result.  For PAGE fields in the header, this will likely be whichever page Word laid out last before the file was saved.


    Josh Curry (jcurry) | Escalation Engineer | US-CSS DSC Protocols Team
    Thursday, December 16, 2010 8:38 PM
    Moderator
  • Hi Tony,Curry

     

    Thank you for the guidance. Greatly appreciate it.

     

    Thank you,

    rana123.

    Wednesday, December 22, 2010 8:19 AM