Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jun 2002
    Location
    RTP, NC, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    RunApp Macro (A97)

    Hello all,
    I want to create a RunApp macro that can be called from a switchboard command button. The macro would open winword.exe and then open a specific file. I can get the macro to open Word and eventually open the document, but I get an error message that says: "Word cannot open the document. Try one or more of the following: *On the file menu click Open, *Make sure the document has a .doc extension" Any ideas how to get rid of this message?

    Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: RunApp Macro (A97)

    If you don't know the drive letter, you will need to know the UNC path to the document, i.e. a path of the form serversharefolder(s)file. The command line for the macro would look like this:

    "C:Program FilesMicrosoft OfficeOfficeWinword.exe" "CompanyServerSalesDeptShareWordFolder2003Invoice. dot"

    with the appropriate names substituted of course. This will OPEN the template, not create a new document based on the template.

  3. #3
    Lounger
    Join Date
    Jun 2002
    Location
    RTP, NC, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RunApp Macro (A97)

    Hans,

    Got that part down now, but it's giving me an error...see my first post (edited) for description.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: RunApp Macro (A97)

    Before trying other things, make absolutely sure that you have no typing errors in the path and/or filename, and that you have quotes around the path/filename, as in my previous reply. If your path and/or filename contain spaces or other "unusual" characters, RunApp will choke on the path/filename otherwise.

  5. #5
    Lounger
    Join Date
    Jun 2002
    Location
    RTP, NC, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RunApp Macro (A97)

    I had to rename the file on the network (taking out spaces) and it now works fine...

    Thanks,

Posting Permissions

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