Use DocVariable field to initiative numbering?
I think I can easily accomplish my see references using this method:
1. In my RoboHelp file, tag the "1" in the phrase See Figure 1 with a
unique style.
2. When I export to Word, the style carries over.
3. In Word, type { AutoNum \*Arabic }. Or go to Insert Field
AutoNum and see the same code. Select this field code and copy it to
the clipboard.
4. Do a find and replace of the unique style with the AutoNum field
code.
This numbering won't interfere with captions or lists.
I'd like to make it into a macro that I can just run.
Greg, earlier you wrote this code:
Sub ScratchMacro()
Dim myRange As Range
Set myRange = ActiveDocument.Range
With myRange.Find
.Text = "XYZ"
.MatchWholeWord = True
While .Execute
myRange.Delete
myRange.InsertCaption Label:="Figure"
Wend
End With
End Sub
Instead of writing .Text, can I use a style there?
And instead of using InsertCaption Label:="Figure", what would I use to
insert the AutoNum tag? I tried InsertAutoNum but it didn't work.
|