WordprocessingML instructions

Posted on 2007-07-25
Last Modified: 2007-07-25
I need to read and interpret a MsWord document, using the WordprocessingML format.

The w:fldSimple elements are field elements, and the w:instr represents a instruction text.
An example:

<w:fldSimple w:instr="AUTHOR \* Upper \* MERGEFORMAT">
      <w:t>Peter Vogel</w:t>

Here are other types of intructions:
REF _Ref153184475 \r \h  \* MERGEFORMAT
REF _Ref167694000 \h  \* MERGEFORMAT
SEQ Example \* ARABIC
SEQ Example \* ARABIC \s 1

Do you know a website that explains how to interpret the instruction text?
For instance, REF means a reference to a caption.
What does \r and \h mean?

Question by:dportabella
    LVL 76

    Accepted Solution

    These are standard Word fields.

    You can learn a lot from the Word User interface Insert/Field menu option. The dialogue  has a Show/Hide codes button. The w:instr part corresponds to the code.

    In fields, the \ precedes an Options switch. In the Ref field dialogue, you will see a lot of option checkboxes on the right. If you tick the 'Hyperlink to paragraph' option, and then click on Field code, you will see that a \h has been added. The \r means that '# of pargraph in relative context' has been ticked.
    Other field dialogues have an options button. For the SEQ field this will lead to a list which includes \s  : "Resets the sequence number at the heading level following the 's'"
    LVL 76

    Assisted Solution

    A Ref field actually refers to a bookmark. In some places this is used to implement other functionalities, such as Captions. A hidden bookmark is automatically generated and set at the target. The name of a hidden bookmark is prefixed with an underscore.

    Author Comment


    very good answer!
    Just a detail: A didn't find the meaning for \* MERGEFORMAT.
    What can it be?

    Even if the user interface let's you test the fields,
    a reference (website, pdf...) with the meaning of all the fields and options would be nice.
    Do you know where to get it?
    LVL 76

    Assisted Solution

    \* MERGEFORMAT fixes the character formatting as previously applied to the field. The formatting of incoming text is ignored.

    Switches are listed here.

    This is Microsoft's reference for the fields

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    It is often necessary in this forum and others to illustrate Word fields as text with the field delimiters replaced with the curly brackets that the delimiters resemble when field codes are being displayed on the document. This means that the text c…
    I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
    This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now