SendObject Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to write a SendObject Macro that auto pouplates the To: Field from
a control.

This is what shows up in the Email To: Line.
[Forms]![Main]![EmployeeEmail]
 
Sorry, but macros cannot accept variables. In order to do this, you must
convert your Macro to Code. To do this, right-click on the macro name then
choose Save As. In the As box, choose Module. This will convert it to VB
code something like this:

DoCmd.SendObject acTable, "Table1", "RichTextFormat(*.rtf)", "xxx",
"xxxx", "xxxxx", "xxxxxx", "xxxxxx", False, ""

The x's represent the To, CC, BCC, Subject, and Message. This is where you
would put your variable:

DoCmd.SendObject acTable, "Table1", "RichTextFormat(*.rtf)", "
[Forms]![Main]![EmployeeEmail]", "xxxx", "xxxxx", "xxxxxx", "xxxxxx", False,
""


--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Mgiardina05

You need to precede it with a = sign.
=[Forms]![Main]![EmployeeEmail]
 
Back
Top