Mail from WORD2000

G

Hallo everybody.
I've a problem. I'm writing a text with WORD 2000. Then I want to send my
current document as body (or attachement) of an e-mail: so, I search in the
FILE menù and I choose SEND TO... ... BY MAIL.
Then, WORD 2000 makes me compile all it needs to send the mail: my document
may be an attachement or the body of the mail itself.

Well. Now I have a list of friends (and e-mail addresses) on ACCESS. I want
to send my document to everyone of the list. How can I make automatic all
the operations?
I tried to use MAILMERGE, and a lot of other commands, but I wasn't able to
do it!
Once (the only time I found a good routine) WORD asked to me to set OUTLOOK,
but if I use the manual procedures it sends by OUTLOOK EXPRESS, which is my
default browser for mail...

Please, can you help me?

Guy
 
P

Perry

An example dealing with
1) Getting records from Access table in Word
2) Sending Mail using MS Outlook in Word
3) Add activedocument as attachment to email

That about covers yr needs, right?
Krgrds,
Perry

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

With cn
.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=d:\test\db1.mdb;"
.Open
End With

rs.Open "select MailAddress from tabel1", cn

Dim ol As New Outlook.Application
Dim mi As Outlook.MailItem

Dim lCnt As Long
Do Until rs.EOF
Set mi = ol.CreateItem(olMailItem)
With mi
.To = rs(0)
.Subject = "Christmas Invitation"
.Body = "Dear Friend"
.Attachments.Add ActiveDocument.FullName, olByValue
.Save
End With
rs.MoveNext
Loop

rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing

ol.Quit
Set ol = Nothing
 
G

Wow! That's really good! Thank you!
But I have a problem now. You have to know that in access I have a lot of
addresses (so a lot of different names).
For everyone I wish to send my active document as body of the mail (using
different parts for everyone)!
I tried to use the following routine:
Options.SendMailAttach = False
ActiveDocument.Sendmailwithout results...
Then I tried this one:

With Documents("Main.doc").MailMerge
.MailAsAttachment = False
.Destination = wdSendToEmail
.MailSubject = "Special offer"
.MailAddressFieldName = "MailAddress"
.Execute
End With

but I had no good results....

So... could you suggest some routine? Thank you very much!!

 
P

Perry

For everyone I wish to send my active document as body of the mail (using
different parts for everyone)!

I don't understand the above, kindly elaborate.
-------------------------------------
Krgrds,
Perry

System parameters:
POS: WinXP SP2
MSO: MSOffice 2003 SP2
DEV: VS8 (dotnet)
-------------------------------------
 
D

Doug Robbins - Word MVP

Mailmerge to Email is designed to do this. What was the specific problem
when you tried it?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

All right: I solved opening the win.ini and setting MAPIX = 1 in the mail
settings part.
Bye!

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top