+ Reply to Thread
Results 1 to 4 of 4

VBA Code to create a new MS Word Document.

  1. #1
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    VBA Code to create a new MS Word Document.

    Dear all,

    I hope you are all well.

    I have a workbook with a table were I insert all my tasks (The new ones, in process, resolved and so on).

    I have a UserForm that let me choose the row of the table I want so I can send an email. So far so good. I am using the following code that works perfectly:

    Please Login or Register  to view this content.
    I need to have something similar, but instead of opening a new Email from Outlook, I need to open a new document from MS Word.

    Your assistance will be highly appreciated.

    Best regards,
    Filipe

  2. #2
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: VBA Code to create a new MS Word Document.

    Please Login or Register  to view this content.
    Hope this helps!

  3. #3
    Forum Contributor pipoliveira's Avatar
    Join Date
    08-09-2012
    Location
    Ireland
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    368

    Re: VBA Code to create a new MS Word Document.

    Hi TKCZBW,

    Thank you for your prompt reply.

    The code opens a new MS Word document, which is great, but I need to have as well some pre-selected text as shown on my code in the "strbody".

    Thanks a million,
    Filipe

  4. #4
    Forum Contributor
    Join Date
    02-28-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    187

    Re: VBA Code to create a new MS Word Document.

    Please Login or Register  to view this content.
    If you want it at a specific location in the word doc, that is a problem that I am currently dealing with as well. My personal thought process is currently leaning towards the use of text boxes. However, this would realy only work if you open an existing blank template with the textboxes in there already.

    If you just need the text at the beginning of the sheet then the code above should do it.

    Best,

    TKCZBW

+ 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. VBA - Create Word Document or Edit Document if exists
    By unstable81 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-11-2013, 08:27 AM
  2. 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
  3. VBA code from Excel to create and add info into a Word Document
    By Boitumelo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-07-2011, 05:15 AM
  4. Replies: 0
    Last Post: 06-15-2011, 02:22 PM
  5. Create word document
    By jonn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-09-2007, 12:27 PM

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