W
wiwidom
Hallo,
I'd like to insert a cross-reference (reference to: only label and
number) to a self defined caption (Insert->reference->caption) using a
macro. Normally this wouldn't be a problem:
Selection.InsertCaption Label:="Test", TitleAutoText:="InsertCaption1",
_
Title:="", Position:=wdCaptionPositionBelow, ExcludeLabel:=0
Selection.InsertCrossReference ReferenceType:="Test", ReferenceKind:= _
wdOnlyLabelAndNumber, ReferenceItem:="1", InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "
But I need a caption with the option "Exclude label from caption".
Now - if I'm using this type of caption (ExcludeLabel:=1) and insert
a cross reference manually, everything is still fine, but if I'm
executing the same command as a macro Word 2003 is inserting nothing
(don't know about other Word versions) ! I even recorded the successful
manual insertion with the recorder (which is creating the same code
lines as above). When I'm executing the macro nothing is inserted.
Does anybody have any idea?
thanks
Dom
I'd like to insert a cross-reference (reference to: only label and
number) to a self defined caption (Insert->reference->caption) using a
macro. Normally this wouldn't be a problem:
Selection.InsertCaption Label:="Test", TitleAutoText:="InsertCaption1",
_
Title:="", Position:=wdCaptionPositionBelow, ExcludeLabel:=0
Selection.InsertCrossReference ReferenceType:="Test", ReferenceKind:= _
wdOnlyLabelAndNumber, ReferenceItem:="1", InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "
But I need a caption with the option "Exclude label from caption".
Now - if I'm using this type of caption (ExcludeLabel:=1) and insert
a cross reference manually, everything is still fine, but if I'm
executing the same command as a macro Word 2003 is inserting nothing
(don't know about other Word versions) ! I even recorded the successful
manual insertion with the recorder (which is creating the same code
lines as above). When I'm executing the macro nothing is inserted.
Does anybody have any idea?
thanks
Dom