Results 1 to 3 of 3

Thread: open Word doc.

  1. #1
    Join Date
    Oct 2002
    Posts
    12

    Post Unanswered: open Word doc.

    hello there,
    I am trying to open the word document from access using macro.
    acan anyone please let me know what action will do this.
    thanks,
    asif

  2. #2
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    147
    Don't use macros, use VBA.

    Search google for 'VBA Word.Application'

    Cheers,
    Andrew
    There have been many posts made throughout the world.
    This was one of them.

  3. #3
    Join Date
    Aug 2002
    Location
    Québec, Canada
    Posts
    109
    Don't use macro, use a module and paste this code

    You can use API, but this will only let WORD to open a file, it will not work if you use an OLE object field in your table and want to open it (you did not specify )

    Code:
    Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    
        'This open test.doc with WORD
        ShellExecute 0, "open", "C:\test.doc", "", "", 0
    JefB

Posting Permissions

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