Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Go To dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
stman - 13 Dec 2007 16:57 GMT
Hi,

I'm trying to create a macro that displays the Go To dialog box with
settings already in place, so the user can find and determine their action
for each found instance individually. The settings are:

Go to what: Field
Enter field name: REF

I've got this working:

Selection.GoTo What:=wdGoToField, Which:=wdGoToNext, Count:=1, Name:="REF"

...which actually goes to the exact item and highlights it. But if I then add:

Dialogs(wdDialogEditGoTo).Display

...the Go To dialog opens but with some other settings. How can I retain the
wdGoToField, wdGoToNext, and Name settings in the displayed dialog?
stman - 14 Dec 2007 15:52 GMT
I guess a more general way of putting it is:

How do you display a dialog with settings already filled in?

And also then end the macro right there with the dialog opened, so the user
can click the document in the background (e.g. the Go To dialog is not modal,
allowing you to move to the document and back).

> Hi,
>
[quoted text clipped - 15 lines]
> ...the Go To dialog opens but with some other settings. How can I retain the
> wdGoToField, wdGoToNext, and Name settings in the displayed dialog?
Steve Yandl - 14 Dec 2007 22:43 GMT
You're very limited on what you can set in advance with some of the dialog
boxes.  You could do something like:

With Dialogs(wdDialogEditGoTo)
.Destination = "REF"
.Show
End With

but that won't force the setting to go to 'Field'.  It will put "REF" in the
dialog but you don't want to direct your users to GoTo a page named "REF".

I think I'd design a custom UserForm and have the code attached to a command
button take the user where you want them to go.

Steve

>I guess a more general way of putting it is:
>
[quoted text clipped - 29 lines]
>> the
>> wdGoToField, wdGoToNext, and Name settings in the displayed dialog?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.