+ Reply to Thread
Results 1 to 3 of 3

Want to Automate Mail Merge Print with Excel VBA, and an Oddity with Automated Mail Merge

  1. #1
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Want to Automate Mail Merge Print with Excel VBA, and an Oddity with Automated Mail Merge

    I use this code in my Excel based VBA project to automate a mail merge. An Excel worksheet provides the data.

    Please Login or Register  to view this content.
    This code, in it's current form, works. It opens my mail merge document, merges the information based on the report's SQL string, saves the file and leaves it open in a minimized window in the taskbar.
    Two questions ...

    1) what do I need to add if I want to print this merged document in addition to having it simple open up to be viewed?
    2) The document is in a minimized window. After maximimizing it, the user has no control of the document ... toolbar buttons don't work, unable to edit the document. You have to minimize it, then maximize it again before the document is accessible. What's up with that?

    Jenn

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Want to Automate Mail Merge Print with Excel VBA, and an Oddity with Automated Mail Me

    Re 1, you need to add something as trivial as:
    odoc2.Printout
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    06-15-2009
    Location
    Ontario, canada
    MS-Off Ver
    Office 365
    Posts
    371

    Re: Want to Automate Mail Merge Print with Excel VBA, and an Oddity with Automated Mail Me

    Thank you Paul, I'll have to give it a go. I think this code is riddled with problems. See my other post http://www.excelforum.com/word-formatting-and-general/844573-mail-merge-time-suddenly-displaying-as-decimals-again.html in this forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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