• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

WordprocessingML instructions

I need to read and interpret a MsWord document, using the WordprocessingML format.
Info: http://rep.oio.dk/Microsoft.com/officeschemas/wordprocessingml_article.htm

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:r>
      <w:t>Peter Vogel</w:t>
   </w:r>
</w:fldSimple>

Here are other types of intructions:
AUTHOR \* Upper \* MERGEFORMAT
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?

0
dportabella
Asked:
dportabella
  • 3
3 Solutions
 
GrahamSkanCommented:
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'"
0
 
GrahamSkanCommented:
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.
0
 
dportabellaAuthor Commented:
GrahamSkan,

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?
0
 
GrahamSkanCommented:
\* MERGEFORMAT fixes the character formatting as previously applied to the field. The formatting of incoming text is ignored.

Switches are listed here.
http://office.microsoft.com/en-gb/word/CH061047321033.aspx

This is Microsoft's reference for the fields
http://office.microsoft.com/en-gb/word/CH061047241033.aspx
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now