View Single Post
 
Old 04-17-2022, 10:45 PM
soroush.kalantari soroush.kalantari is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Jun 2021
Posts: 124
soroush.kalantari is on a distinguished road
Default 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.
Reply With Quote