A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Mail Merge from vba Outlook using Word Template



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 25th 08, 07:51 PM posted to microsoft.public.outlook.program_vba
Wouter
external usenet poster
 
Posts: 3
Default Mail Merge from vba Outlook using Word Template

Hi all,

I'm trying to establish an email merge from Outlook.

Goal1: I've a e-mail merge template in Word and I would like to create a vba
script (outlook) that will email merge from outlook with the template I've in
Word.

The reason I want the code done in Outlook is that I then bypass the
security alerts build in Outlook. I assume, based on some stuff I read on
various web-sites, when you use vba outlook code, outlook will see this as
trusted and therefore won't alert.

Goal2: I've setup two accounts in outlook. One is the default account
(microsoft exchange server) and in that account I've got an other inbox. So
I'm able to send emails on behalf of that account. The emails I want to send
via mail merge should use this secondairy email address.

Could you explain how difficult it is, add some code snippets, and some
experiences.

Microsoft Office Professional 2003 SP3.
Please bare in mind that opt ins for Outlook to disable alerts is not an
option, unless you can setup rules to determine what kind of applications can
disable the alerts.



I'm not an advanced vba user so please keep it as simple as possible :-)

'Do mailmerge
With ActiveDocument.MailMerge
.Destination = wdSendToEmail 'mail merge via email
.SuppressBlankLines = True 'do not attempt to send to blanc rows in
email field
With .DataSource 'fixed data source needs to be set in document
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
.Execute Pause:=True 'return error message if errors occur
End With

Many thanks! Wouter

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mail merge word template from outlook, business contact manager Vicki Doyle Outlook - Using Contacts 1 July 15th 08 10:33 PM
mail merge with Word/Outlook 2007 Dale Peart Outlook - General Queries 3 December 18th 07 03:00 AM
Mail Merge with Outlook and Word 2007. Hyperion Outlook - Using Contacts 3 March 9th 07 11:19 AM
Mail Merge from Outlook to Word Khiva Outlook - General Queries 1 December 16th 06 04:26 AM
How to direct output from Word mail merge to multiple Word documents [email protected] Outlook - General Queries 3 August 11th 06 05:10 AM


All times are GMT +1. The time now is 10:19 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.