Forum Discussion
reference doesn't work in word
Hi,
When I cross-reference or insert citation, table of contents, or captions, instead of showing the reference, it shows something like this: {STYLEREF 1\s}-{SEQ Table....} or {CITATiON TES...} or {TOC\O"1-3"...}. How can I make it display correctly?
Thanks,
Trang
Use a macro containing the following code
Sub MakeSubDoc()
Dim source As Document
Dim target As Document
Dim str As String
Dim rngstr As Range
Set source = ActiveDocument
Set target = Documents.Add
source.Activate
str = InputBox("Insert the text to be found.")
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:=str, MatchWildcards:=False, MatchCase:=True, Wrap:=wdFindStop, Forward:=True) = True
Set rngstr = Selection.Range.Bookmarks("\line")
target.Range.InsertAfter rngstr & vbCr
Selection.Collapse wdCollapseEnd
Loop
End With
target.Activate
End Sub
1 Reply
Press Alt + f9 which toggles between code and regular text.
If you find this information help, please mark it as the best solution, which will assist others with the same question.
/Teresa
#traccreations4e