Reply
 
Thread Tools Display Modes
  #1   Report Post  
Jef Gorbach
 
Posts: n/a
Default mail merge Outlook2000 to Word97 by VBA

Co-worker running Word97 mailmerges from his Outlook2000 contact folder
several times a week/month so would like to automate the process. Sounds
simple, but Outlook lacks the macro recorder so need help with the
underlying vba; especially since whomever loaded Outlook omitted installing
Outlook's vba help file.

Havent had much luck with Google/Usenet on this yet, encountering numerous
reccomendations to start the merge from Outlook...however the few postings
found regarding automating this process imply it cant be done....although
there are plenty of examples confirming there ARE contact
list properties/methods so it should be possible??

One vba example from (misplaced url) indicates it does this, however imports
the selected Outlook97 contacts into an Access97 table then mailmerges from
it. Unfortunately we dont have Access.

The manual screens imply its essentially:
With selected Contacts
mail merge
using only selected contacts
to existing document (say c:\desktop\sales letter form.doc)
merge option: form letter
merge to new document
end with

so presumably we could resort to a WSH Sendkeys routine but shouldnt this
be possible for a VBA routine WITHIN either Outlook or Word ??



  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

If your co-worker is already using Outlook Tools|Mail Merge to initiate the
merge, I think the basic problem is that Outlook VBA does not have the
methods to replicate that particular process programmatically. In fact there
are quite a lot of things you can do manually in Outlook that do not have
corresponding methods in Outlook VBA - for example, I have a feeling that
you cannot automate the data export process either.

So I suspect the best you can do is something that achieves the same
results. http://www.slipstick.com has some samples that you may find useful.
If you search Google Groups for Peter Jamieson Inspector you may find an
article of mine around Oct 2002 that has some code to generate Word
documents from /individual/ contacts. It doesn't use Mail merge though.

Peter Jamieson
"Jef Gorbach" wrote in message
...
Co-worker running Word97 mailmerges from his Outlook2000 contact folder
several times a week/month so would like to automate the process. Sounds
simple, but Outlook lacks the macro recorder so need help with the
underlying vba; especially since whomever loaded Outlook omitted
installing
Outlook's vba help file.

Havent had much luck with Google/Usenet on this yet, encountering numerous
reccomendations to start the merge from Outlook...however the few postings
found regarding automating this process imply it cant be done....although
there are plenty of examples confirming there ARE contact
list properties/methods so it should be possible??

One vba example from (misplaced url) indicates it does this, however
imports
the selected Outlook97 contacts into an Access97 table then mailmerges
from
it. Unfortunately we dont have Access.

The manual screens imply its essentially:
With selected Contacts
mail merge
using only selected contacts
to existing document (say c:\desktop\sales letter form.doc)
merge option: form letter
merge to new document
end with

so presumably we could resort to a WSH Sendkeys routine but shouldnt this
be possible for a VBA routine WITHIN either Outlook or Word ??





  #3   Report Post  
Jef Gorbach
 
Posts: n/a
Default


Thanks for confirming my conclusion and suggestions.
Wonder why the Outlook Team didnt "finish" VBA like the Excel/Word Teams
did??

"Peter Jamieson" wrote in message
...
If your co-worker is already using Outlook Tools|Mail Merge to initiate

the
merge, I think the basic problem is that Outlook VBA does not have the
methods to replicate that particular process programmatically. In fact

there
are quite a lot of things you can do manually in Outlook that do not have
corresponding methods in Outlook VBA - for example, I have a feeling that
you cannot automate the data export process either.

So I suspect the best you can do is something that achieves the same
results. http://www.slipstick.com has some samples that you may find

useful.
If you search Google Groups for Peter Jamieson Inspector you may find an
article of mine around Oct 2002 that has some code to generate Word
documents from /individual/ contacts. It doesn't use Mail merge though.

Peter Jamieson
"Jef Gorbach" wrote in message
...
Co-worker running Word97 mailmerges from his Outlook2000 contact folder
several times a week/month so would like to automate the process. Sounds
simple, but Outlook lacks the macro recorder so need help with the
underlying vba; especially since whomever loaded Outlook omitted
installing
Outlook's vba help file.

Havent had much luck with Google/Usenet on this yet, encountering

numerous
reccomendations to start the merge from Outlook...however the few

postings
found regarding automating this process imply it cant be

done....although
there are plenty of examples confirming there ARE contact
list properties/methods so it should be possible??

One vba example from (misplaced url) indicates it does this, however
imports
the selected Outlook97 contacts into an Access97 table then mailmerges
from
it. Unfortunately we dont have Access.

The manual screens imply its essentially:
With selected Contacts
mail merge
using only selected contacts
to existing document (say c:\desktop\sales letter form.doc)
merge option: form letter
merge to new document
end with

so presumably we could resort to a WSH Sendkeys routine but shouldnt

this
be possible for a VBA routine WITHIN either Outlook or Word ??







  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

I don't know what happened to Outlook VBA, which was a relatively late
addition to Outlook. However, my best guess is that MS may think that any
increase in Outlook programmability is a potential source of new security
problems and therefore to be avoided.

Peter Jamieson
"Jef Gorbach" wrote in message
...

Thanks for confirming my conclusion and suggestions.
Wonder why the Outlook Team didnt "finish" VBA like the Excel/Word Teams
did??

"Peter Jamieson" wrote in message
...
If your co-worker is already using Outlook Tools|Mail Merge to initiate

the
merge, I think the basic problem is that Outlook VBA does not have the
methods to replicate that particular process programmatically. In fact

there
are quite a lot of things you can do manually in Outlook that do not have
corresponding methods in Outlook VBA - for example, I have a feeling that
you cannot automate the data export process either.

So I suspect the best you can do is something that achieves the same
results. http://www.slipstick.com has some samples that you may find

useful.
If you search Google Groups for Peter Jamieson Inspector you may find an
article of mine around Oct 2002 that has some code to generate Word
documents from /individual/ contacts. It doesn't use Mail merge though.

Peter Jamieson
"Jef Gorbach" wrote in message
...
Co-worker running Word97 mailmerges from his Outlook2000 contact folder
several times a week/month so would like to automate the process.
Sounds
simple, but Outlook lacks the macro recorder so need help with the
underlying vba; especially since whomever loaded Outlook omitted
installing
Outlook's vba help file.

Havent had much luck with Google/Usenet on this yet, encountering

numerous
reccomendations to start the merge from Outlook...however the few

postings
found regarding automating this process imply it cant be

done....although
there are plenty of examples confirming there ARE contact
list properties/methods so it should be possible??

One vba example from (misplaced url) indicates it does this, however
imports
the selected Outlook97 contacts into an Access97 table then mailmerges
from
it. Unfortunately we dont have Access.

The manual screens imply its essentially:
With selected Contacts
mail merge
using only selected contacts
to existing document (say c:\desktop\sales letter form.doc)
merge option: form letter
merge to new document
end with

so presumably we could resort to a WSH Sendkeys routine but shouldnt

this
be possible for a VBA routine WITHIN either Outlook or Word ??









Reply
Thread Tools
Display Modes

Posting Rules

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 2003 Issue S.Nicks Mailmerge 5 February 20th 09 01:55 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Problem with automating mail merge HeatherO Mailmerge 2 March 29th 05 10:11 PM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM


All times are GMT +1. The time now is 05:57 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"