Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Populate Templates From Outlook? (Office 2003)

    I have a Word template that I have to populate using data from incoming email messages. Basically, I have to copy and paste 2 pieces of data, the subject line and the body of the letter, into two separate areas of a word template. What I would like to do is have Outlook automatically drop this data into a word template so that I can just open the letter and print it with the template and all data in place.

    Is this possible?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Populate Templates From Outlook? (Office 2003)

    Generally speaking, if you have a message open in Outlook, you can run a macro (VBA procedure) to automate Word (e.g., create a new document based on your template, then insert information at predefined points). Outlook has heightened security on address fields, but it should be no problem to copy the subject line and the message body. (With HTML messages there may be some formatting issues.)

    So it's possible, but someone is going to have to write some code. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  3. #3
    New Lounger
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populate Templates From Outlook? (Office 2003)

    I will check that out, thanks...looking for help on macro record in outlook now...

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

    Re: Populate Templates From Outlook? (Office 2003)

    The macro in the attached text file will take the e-mail that is selected in the main Outlook window or that has been opened by the user, create a new Word document from a specified template, and place the subject and body of the e-mail in predefined bookmarks.

    You can copy the code into a standard module in the Visual Basic Editor in Outlook (in VbaProject.otm), and assign the macro CreateWordDoc to a custom toolbar button. All you need to do then is select or open an e-mail message and click the button.

    Note: you'll get a security warning when you run the macro. To suppress this warning, you can install the free utility ClickYes.

    Prerequisites:
    - Create a Word template.
    - Use Insert | Bookmark to insert a bookmark named Subject where you want the e-mail's subject to be placed, and a bookmark named Body where you want the e-mail's body to be inserted.
    - Save the template.
    - Modify the constant strTemplate in the code to contain the name of the template; if it is not in your default templates folder, add the path.

    The macro works in my situation, but you should test it thoroughly.

    PS part of the code is derived from <!profile=JohnBF>JohnBF<!/profile>'s add-in Outlook Attachment Removal Manager.
    Attached Files Attached Files

  5. #5
    New Lounger
    Join Date
    Mar 2007
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Populate Templates From Outlook? (Office 2003)

    Once again, Hans saves the tail of a lesser mortal!
    I will let you know how this turns out...

Posting Permissions

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