SteveatPMP
Programmer
Hello
I am using VFP 9.0 and Outlook 2007 as well as word 2007 I need to automatically send an email that will put a word document in the body and attaches 3 files as attachments.
I have used code like this in the past
Start outlook
Local oappoutlook
oappoutlook = Createobject("Outlook.application")
* Get MAPI namespace
Local nmmapi
nmmapi = oappoutlook.getnamespace("MAPI")
* Create new message
* Fill in message Data
Select emailaddr
Go Top
Do While !Eof()
? Addr
Local lofolder,msg
lofolder = nmmapi.getdefaultfolder(4) && outbox
msg = lofolder.items.Add()
msg.recipients.Add(Addr) && Insert email address
msg.subject = csubject
msg.body = massmailconfig.emailmsg
*msg.body = (massmailmesg.docx)
msg.Send() && Send this message
Skip
Enddo
and this works, however I can get the msg.body to handle anything but plain text and I need to include formatted text, color, fonts and bolding.
Thank you
I am using VFP 9.0 and Outlook 2007 as well as word 2007 I need to automatically send an email that will put a word document in the body and attaches 3 files as attachments.
I have used code like this in the past
Start outlook
Local oappoutlook
oappoutlook = Createobject("Outlook.application")
* Get MAPI namespace
Local nmmapi
nmmapi = oappoutlook.getnamespace("MAPI")
* Create new message
* Fill in message Data
Select emailaddr
Go Top
Do While !Eof()
? Addr
Local lofolder,msg
lofolder = nmmapi.getdefaultfolder(4) && outbox
msg = lofolder.items.Add()
msg.recipients.Add(Addr) && Insert email address
msg.subject = csubject
msg.body = massmailconfig.emailmsg
*msg.body = (massmailmesg.docx)
msg.Send() && Send this message
Skip
Enddo
and this works, however I can get the msg.body to handle anything but plain text and I need to include formatted text, color, fonts and bolding.
Thank you