• Using Word Open file method (2003 – 2007)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Using Word Open file method (2003 – 2007)

    Author
    Topic
    #457042

    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.

    Viewing 0 reply threads
    Author
    Replies
    • #1144630

      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.

      Sub OpenFile()
      With Dialogs(wdDialogFileOpen)
          .Name = "*.*"
          .Show
      End With
      End Sub
      
    Viewing 0 reply threads
    Reply To: Using Word Open file method (2003 – 2007)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: