Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Word Doc from Excel Macro (Excel 2000)

    Looking to see if anyone can help on this...my VBA is very limited. How can I open a Word document using code in Excel, so that I can assign it to a command button I've created from the form toolbar? The Word doc is in a path for example:

    Cocuments and SettingsNannetteDesktopFINAL PROJECTmanual.doc

    But I want it to open once sent via email as an attachment to another user. How can that be done?

    Thanks a bunch.
    Nannette
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Open Word Doc from Excel Macro (Excel 2000)

    Why don't you create a hyperlink to it?
    Insert - hyperlink
    Browse and find the file

    When selected in excel it will run it. No coding whatsoever.

    Steve

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Excel Macro (Excel 2000)

    If this excel file is mailed to someone else with the word document attached, how am I to know where to hyperlink it to? Once it is in their outlook box, or their mail whatever kind it may be, how would a link that I created on my computer to the Word file from Excel (even if saved in the same folder)...know how it is linked once on someone else's computer? That's the poser?
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Open Word Doc from Excel Macro (Excel 2000)

    You still want to do it the way Steve mentioned: with a hyperlink. When you do Insert -> Hyperlink, remove all of the device & path, just leave the filename. Then, when you send both the workbook and document in email, the receiver just needs to save both of them in the same directory before opening the workbook. HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Word Doc from Excel Macro (Excel 2000)

    Thank you guys...as always!
    Nannette <img src=/S/salute.gif border=0 alt=salute width=15 height=20>
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  6. #6
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Open Word Doc from Excel Macro (Excel 2000)

    In addition to Sam's comment, make sure that "Use relative path for hyperlink" is checked (it should be the default) to ensure that it will assign the path relative to the path of the file.

    Steve

Posting Permissions

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