Thread: InputBox error
View Single Post
 
Old 05-12-2022, 07:14 PM
brownees brownees is offline Windows 10 Office 2021
Novice
 
Join Date: May 2022
Location: Tauranga, New Zealand
Posts: 8
brownees is on a distinguished road
Default

OK next question. The following macro outputs a cross-reference to Photo 14 as per the attached which works nicely and updates when additional photos are inserted. Good start.

I want to insert a reference to just the photo number (not the label and number), i.e. output "Refer 13". Number only is not an option on the attached diaogue cross-reference box. Does that mean it can't be done?

As an aside it would be useful to see a list of all the available ReferenceKind options - is this possible?

All assistance much appreciated...


Sub TestPhotoCrossReference()
'Inserts cross reference to photo number

'Output cross reference
Selection.TypeText Text:="Refer "
Selection.InsertCrossReference ReferenceType:="Photo", ReferenceKind:= _
wdOnlyLabelAndNumber, ReferenceItem:="14", InsertAsHyperlink:=False

Selection.TypeParagraph

End Sub
Attached Images
File Type: png zz3.png (1.3 KB, 15 views)
File Type: png zz2.png (24.5 KB, 15 views)
Reply With Quote