+ Reply to Thread
Results 1 to 10 of 10

Help with Launch a word document from my macro

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    Bakersfield
    MS-Off Ver
    Excel 2013
    Posts
    16

    Help with Launch a word document from my macro

    Hello and thanks in advance for your help.

    I'm creating a new folder with copies of dox needed for a project, I want to launch the first dox at the close of this macro.

    Please Login or Register  to view this content.

    Thanks again

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Launch a word document from my macro

    Hi,

    Firstly you need to declare "wordapp":
    Please Login or Register  to view this content.
    Then your red code needs to look something like this:
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    Bakersfield
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Help with Launch a word document from my macro

    Thank you for the help but,
    The files are getting copied and moved but the macro is giving me an error message, see below.

    File not found.jpgFiles added.jpg

    Please Login or Register  to view this content.
    I tried change the file name as well as changing to a fixed directory. I got the same error message with the commented out ToPath structure as well.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Launch a word document from my macro

    Hi,

    In the image "File not found.jpg", if you press the "Debug" button on that prompt, which line of code is highlighted?

  5. #5
    Registered User
    Join Date
    08-15-2013
    Location
    Bakersfield
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Help with Launch a word document from my macro

    Hello,
    Please Login or Register  to view this content.
    This line.

  6. #6
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Launch a word document from my macro

    Try this:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-15-2013
    Location
    Bakersfield
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Help with Launch a word document from my macro

    aj,

    That didn't work either.

    I'm beginning to think it's not a code issue, because I run this simple open word and get the same message. I've tried different dox as well.

    Please Login or Register  to view this content.
    Both 2013 Word doc and 2013 excel. Tried with the .doc ext, and countless other documents all present in C:\MOC

    All files could not be found.

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Launch a word document from my macro

    Hi again,

    Your sample above wouldn't work, as "C:\MOC" & "\" & "MOC Application" does not actually specify a file to open, only a directory.

    Have you tried simply
    Please Login or Register  to view this content.
    as in my initial suggestion??? Or perhaps you are only missing the file extension:
    Please Login or Register  to view this content.
    It is hard to tell because I don't know what the final value of ToPath is, so I'm only guessing whether or not you are pointing to a directory, or if you pointing to a file but leaving off the file extension.
    Last edited by ajryan88; 09-16-2013 at 10:08 PM.

  9. #9
    Registered User
    Join Date
    08-15-2013
    Location
    Bakersfield
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Help with Launch a word document from my macro

    Oh my goodness. Yeah AJ, I tried the .doc extension and it didn't work, but the extension is docx. wow

    Thanks everyone, grrrrr. So dumb.

  10. #10
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: Help with Launch a word document from my macro

    Hahaha no problems!

    Please don't forget to click on the * next to my post(s) to say thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Add text to Existing Word Document if it Doesn't exist create Word Document
    By unstable81 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-10-2013, 12:15 AM
  2. Replies: 0
    Last Post: 06-15-2011, 02:22 PM
  3. Macro to search Word Document
    By AndyIC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2008, 12:47 PM
  4. Launch Word file from Excel VBA
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 07-23-2006, 01:45 AM
  5. [SOLVED] Macro launch - Button vs Manual launch , has different results.
    By Wayne in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-23-2005, 08:06 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1