How to Write a macro to automate Cross Refrenceing?
As following, I have written a macro to automate Cross Referencing to Word Curves. When I running the macro, It encounter “Run-time error 4198,. Command failed”, Can anybody Guides me on this issue? (When I first wrote this macro, It worked for a While, But then stopped working)
Sub crosscurve()
Selection.InsertCrossReference ReferenceType:="curve", ReferenceKind:= _
wdOnlyLabelAndNumber, ReferenceItem:=InputBox("what is the number of curve do you want to refer?"), InsertAsHyperlink:=True, _
IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "
End Sub
Last edited by soroush.kalantari; 04-18-2022 at 04:24 AM.
|