Help with SendObject

  • Thread starter Thread starter DevilDog1978
  • Start date Start date
D

DevilDog1978

I am trying to figure out how to add the current date to the subject line and
in the Message Text field. I am using Office 2003. I am thinking this might
have to be done using VBA...and I have no clue how to use VBA.
 
If you look at the help file regarding the sendobject method you will see the
available input variable to you.

SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc, Subject,
MessageText, EditMessage, TemplateFile)

As such, you control the Subject by manipulating the 7th input variable and
the Message with the 8th input variable.

I do not know exactly your need (simple e-mail, attaching report...) but
below is a simplified example you can start to work with.

sSubject = "Your subject line :: " & Format(Date, "yyyy-mmm-dd")
sMsg = "Your actual e-mail message " & Format(Date, "yyyy-mmm-dd")
DoCmd.SendObject acSendNoObject, , ,"(e-mail address removed)", , , sSubject,
sMsg

In the example above, I simply use the Format() in conjunction with the
Date() to add the date to the subject and/or message.

Are you wanting to send out an e-mail using a button on a form, or do you
have other needs?

If you need more help, post back.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 

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

Similar Threads

email using sendobject in access 2
SendObject acHTMLFormat Ignored? 5
SendObject 2
Emailing a Form 4
SendObject - Macro 1
Access 2007 Runtime and SendObject 2
SendOBject error 1
SendObject Message Limit Help 2

Back
Top