View Single Post
  #7   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Lets go by ur statements:
In the first instance u tell me i cannot automate with mail merge feature
and
with OpenDataSource method also it won't connect.I have tried to
understand
this but when it comes to my code ..u r askin me to use mail merge ...how
is
that possible??


My suggestion was that you export your data from Outlook and then use the
exported data as the data source. so that you no longer have to connect
directly to Outlook. That way, a mailmerge is feasible.

But if you do not have to use mailmerge, there is probably a better way...

without mailmerge thr is no way to add envelopes..


You can try using

ActiveDocument.Envelope.Insert

which allows you to add an address and return address. Then you would need
to print or save the document.

Unfortunately I'm about to go away so cannot follow this up, but if you look
in Word VBA help for the Envelope object you should find at least one
example.

Peter Jamieson

"Sabi S via OfficeKB.com" wrote in message
...

Lets go by ur statements:
In the first instance u tell me i cannot automate with mail merge feature
and
with OpenDataSource method also it won't connect.I have tried to
understand
this but when it comes to my code ..u r askin me to use mail merge ...how
is
that possible??

My code :

I create an envelope document.'i' loops through all contacts in contact
folder and in list1..I have a list of email addresses on my interface for
the
user to select to create envelopes for that many addresses.
So when 'a' i.e contact.email1address from contacts folder matches 'k' i.e
selected addresses by the user..it goes in the loop and creates an
envelope
for all the addresses selected but the final output is only one envelope
which overwrites all the address and gives me one envelope with the last
email address selected..this loop works perfectly in terms of inserting
addresses in the envelope document but does not create multiple envelopes
accordingly..how to go about it???..pls give me the code..if I use
mailmerge.
execute it gives an error..without mailmerge thr is no way to add
envelopes..
Pls help me out...thx in advance...

--
Message posted via http://www.officekb.com