Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2003
    Location
    Detroit, Michigan, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dialogs (WD2000)

    I need to pass the name of the selected file on the WdFileOpen dialog box and assign it to a string variable. How can I do it programmatically after calling the dialog box??
    <<<<dialogs(WdDialogFileOpen).display>>>>>
    Thanks in advance

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Dialogs (WD2000)

    Hi,
    Something like this should get you started - hard to be specific without knowing what you're doing:
    <pre>Sub testdlg()
    Dim dlgOpen As Dialog, strFileName As String
    Set dlgOpen = Dialogs(wdDialogFileOpen)
    With dlgOpen
    .Display
    strFileName = .Name
    End With
    End Sub
    </pre>

    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    New Lounger
    Join Date
    Mar 2003
    Location
    Detroit, Michigan, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dialogs (WD2000)

    Sure did....(now I wonder ...why the ".Name" prop is not available on the autofill list?)

  4. #4
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Dialogs (WD2000)

    I guess it would have been too tricky to get the Intellisense to alter the list according to which Dialog box you were after. If you look up Built In Dialog Box Argument Lists in help you should get a fairly comprehensive overview and most of them can be applied as properties using the same name. (It would be too easy if they all worked)!
    Regards,
    Rory

    Microsoft MVP - Excel

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dialogs (WD2000)

    Because dlgOpen is just a Dialog object, i.e., intellisense knows not what properties are specific to the Dialog.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •