A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Word sendmail command - reference?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 2nd 06, 07:28 PM posted to microsoft.public.outlook.program_vba,microsoft.public.word.vba.beginners
Charles Kenyon
external usenet poster
 
Posts: 53
Default Word sendmail command - reference?

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.



  #2  
Old June 2nd 06, 08:00 PM posted to microsoft.public.outlook.program_vba,microsoft.public.word.vba.beginners
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Word sendmail command - reference?

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.




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Reference header/footer files Mr. Esteban Outlook and VBA 1 May 27th 06 12:35 PM
Adding Automatic Reference Number [email protected] Add-ins for Outlook 4 April 27th 06 10:12 PM
Automatic Generation of a Reference Number [email protected] Outlook - General Queries 1 April 27th 06 05:19 PM
Outlook 2003 Quick Reference Card Bruce Outlook - General Queries 2 April 19th 06 04:41 PM
Reference Formula ~KO Outlook - Using Forms 3 February 24th 06 09:20 PM


All times are GMT +1. The time now is 08:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.