Bug with cross-references in VBA?



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

.



Relevant Pages

  • Re: How to make custom linked cross-references?
    ... If somebody wants the package on CTAN, ... a macro \p@which is intended for providing some ... A reference to section~of this book ... You might wish to take reference to yet another label within ...
    (comp.text.tex)
  • Re: How to make custom linked cross-references?
    ... If somebody wants the package on CTAN, ... a macro \p@which is intended for providing some ... A reference to section~of this book ... You might wish to take reference to yet another label within ...
    (comp.text.tex)
  • Re: how to cross reference multiple but sequential captioned figures
    ... If I insert a figure caption using Insert | Reference ... cross-reference that says "Figure 1." ... still surrounding the entire label in the original caption. ...
    (microsoft.public.word.pagelayout)
  • Re: Macro to refecence current control
    ... I don't think you can do this directly with a Label. ... Caption the same as the caption of the label. ... Then apply the macro to ... value of the control that called the macro. ...
    (microsoft.public.access.forms)
  • Re: Can I create a new "type" of reference?
    ... When you insert cross-references to your captions are you using Insert | ... Reference | Cross-reference to Fig. and selecting "Only label and number"? ... you should not be getting the entire caption. ... Insert/Reference/Caption where I have created a new label Fig. ...
    (microsoft.public.word.docmanagement)

Loading