I'm not very familiar with SendMail but you certainly can do all that using
the Outlook object model.
Sub Whatever(s As String, b As String)
Dim oOL As Outlook.Application
Dim oMail As Outlook.MailItem
Dim oNS As Outlook.NameSpace
Set oOL = CreateObject("Outlook.Application")
Set oNS = oOL.GetNameSpace("MAPI")
oNS.Logon "", "", False, False
Set oMail = oOL.CreateItem(olMailItem)
oMail.Subject = s
oMail.Body = b
oMail.Recipients.Add "
oMail.Recipients.ResolveAll
oMail.Display
' oMail.Send to send it
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Charles Kenyon" wrote in message
...
Office 2003 Pro
I am trying to write a macro that sends a protected form as an attachment
and creates parts of the email from the formfields. (It is a phone
message.) The email program is Outlook.
I know how to get the info from the formfields, I just don't know how to
put it into the email message as subject or message body.
Also, can I specify the recipient in the macro? Can I issue the send
command? (I would like the person taking the message to just be able to
press a Send button and not have to mess with the email message at all.)
Can anyone recommend references on the sendmail command, or do I want to
be programming Outlook? I have Sue Mosher's programming Outlook 2003.
--
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide
See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
My criminal defense site: http://addbalance.com
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.