Code: Select all
Selection.InsertCaption Label:="Table"
Code: Select all
Selection.InsertCaption Label:="Table", Title:=": my Title Here"
Ken
Code: Select all
Selection.InsertCaption Label:="Table"
Code: Select all
Selection.InsertCaption Label:="Table", Title:=": my Title Here"
Code: Select all
With Selection
.InsertCaption Label:="Table"
.Collapse wdCollapseEnd
.InsertBefore " "
.Collapse wdCollapseEnd
.InsertCrossReference ReferenceType:="Heading", ReferenceKind:=wdContentText, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "
End With
Code: Select all
{ REF myBookmarkName \h \* Charformat }
Code: Select all
.InsertCrossReference ReferenceType:="Heading", ReferenceKind:=wdContentText, ReferenceItem:="1", _
InsertAsHyperlink:=True, IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "
Code: Select all
.Fields.Add .Range, wdFieldEmpty, "REF myBookmarkName \h \* Charformat", False
Code: Select all
.Start = .Start - 1
.Fields(1).Code.Characters.First.Next.Font.Italic = True
Code: Select all
With Selection
.InsertCaption Label:="Table", Title:=":" & vbTab & "my text here"
.Fields.Add _
Range:=Selection.Range, _
Type:=wdFieldRef, _
Text:="myBookMarkNane \h \* Charformat", _
PreserveFormatting:=False
End With
Code: Select all
... & "my text here "
Code: Select all
... & "my text here" & " "
Code: Select all
With Selection
.InsertCaption Label:="Table", Title:=":" & vbTab & "my text here"
.Collapse wdCollapseEnd
.TypeText " "
.Collapse wdCollapseEnd
.Fields.Add _
Range:=Selection.Range, _
Type:=wdFieldRef, _
Text:="myBookMarkNane \h \* Charformat", _
PreserveFormatting:=False
End With
I already showed you how to do that ...stuck wrote:Thank you again, I'm nearly there.
…
EXCEPT I cannot get a space to appear between the end of the title text and the inserted cross ref field. I'd expect it to be as simple as having a trailing space on the end of title text:
...
Any tips on how to get my cross ref field to be preceded by a space?
Code: Select all
.InsertAfter (" ")
.Collapse wdCollapseEnd