M
Michele Finkel
(Please remove ".NOSPAM" from my address if replying by
email.)
I am not getting expected responses when displaying and/or
updating the InsertCrossReference dialog. I've used these
methods successfully with other dialogs (e.g., FileOpen),
but they're not working here. I have tried variations on
this theme, the objective being to populate the dialog
with default preferences and trying to capture the
reference item:
With Dialogs(wdDialogInsertCrossReference)
.InsertAsHyperlink = True
.ReferenceType = wdCaptionFigure 'also tried
= "Figure"
.ReferenceKind = wdOnlyLabelAndNumber ' also
tried = 8
.Update
.Display
myVariable = .ReferenceItem
End With
My results have been consistently baffling with this
particular dialog:
- If I click the Insert button in the dialog, it DOES
execute the action to insert the cross-reference despite
the fact that the Display method shouldn't do this. I've
tried "If .Display <> 0 Then..." statements, but the
action is still executed.
- Whether or not I specify any default values, the dialog
is displayed with Numbered Items as the type and Page
Number as the kind. If one displays the dialog manually,
the values will _always_ be how you left them (e.g., type
is Figure), but _never_ are when the dialog is displayed
(or shown) programmatically.
- Reference item is always returned as null. I can return
the kind or type (whether I set them before displaying the
dialog or set them manually in the dialog), but cannot
return the type.
- If I omit the Update command, then the InsertAsHyperlink
value is checked but grayed when the dialog is displayed
and the item is inserted as a hyperlink. If I use the
Update method then the InsertAsHyperlink displays as false
(contrary to my request). Odd, but at least I can work
with it.
If you believe the help file, when using the Display
method with built-in dialogs, "Any actions initiated or
settings specified while a dialog box is displayed using
this method aren't carried out." The help also states
that I should be able to "Use the Update method to ensure
that the dialog box values reflect the current values."
Again, I've used these methods successfully with other
dialogs (e.g., FileOpen). Not working here. Can anyone
shed some light or help me solve the puzzle? I'm reading
the help files and they're taking me in very large
circles...
TIA.
email.)
I am not getting expected responses when displaying and/or
updating the InsertCrossReference dialog. I've used these
methods successfully with other dialogs (e.g., FileOpen),
but they're not working here. I have tried variations on
this theme, the objective being to populate the dialog
with default preferences and trying to capture the
reference item:
With Dialogs(wdDialogInsertCrossReference)
.InsertAsHyperlink = True
.ReferenceType = wdCaptionFigure 'also tried
= "Figure"
.ReferenceKind = wdOnlyLabelAndNumber ' also
tried = 8
.Update
.Display
myVariable = .ReferenceItem
End With
My results have been consistently baffling with this
particular dialog:
- If I click the Insert button in the dialog, it DOES
execute the action to insert the cross-reference despite
the fact that the Display method shouldn't do this. I've
tried "If .Display <> 0 Then..." statements, but the
action is still executed.
- Whether or not I specify any default values, the dialog
is displayed with Numbered Items as the type and Page
Number as the kind. If one displays the dialog manually,
the values will _always_ be how you left them (e.g., type
is Figure), but _never_ are when the dialog is displayed
(or shown) programmatically.
- Reference item is always returned as null. I can return
the kind or type (whether I set them before displaying the
dialog or set them manually in the dialog), but cannot
return the type.
- If I omit the Update command, then the InsertAsHyperlink
value is checked but grayed when the dialog is displayed
and the item is inserted as a hyperlink. If I use the
Update method then the InsertAsHyperlink displays as false
(contrary to my request). Odd, but at least I can work
with it.
If you believe the help file, when using the Display
method with built-in dialogs, "Any actions initiated or
settings specified while a dialog box is displayed using
this method aren't carried out." The help also states
that I should be able to "Use the Update method to ensure
that the dialog box values reflect the current values."
Again, I've used these methods successfully with other
dialogs (e.g., FileOpen). Not working here. Can anyone
shed some light or help me solve the puzzle? I'm reading
the help files and they're taking me in very large
circles...
TIA.