Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Word Open file method (2003 - 2007)

    Using VB6 I am currently using thre common dialog object (comdlg32.ocx) to create a dialog to naviagate to a word doc, select it and then use the "documents.open" method to open the file. Is there a method or technigue to access the open document dialog built into Word? I tried recording a macro to see how but it only showed how to open a document after it was selected. The reason I ask about this is I am finding that the comdlg32.ocx is not on or not registered on several machines especially Vista.

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Using Word Open file method (2003 - 2007)

    One can use the Dialogs Property to do this.

    You can use this code to open a document in Word. Tweak the settings as desired.
    <pre>Sub OpenFile()
    With Dialogs(wdDialogFileOpen)
    .Name = "*.*"
    .Show
    End With
    End Sub
    </pre>

    Regards,
    Rudi

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Word Open file method (2003 - 2007)

    Thank you Rudi.

Posting Permissions

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