Try posting this to microsoft.public.outlook.programming_vba for assistance with programming questions. Few developers hang out here.
--
Milly Staples [MVP - Outlook]
Post all replies to the group to keep the discussion intact. All
unsolicited mail sent to my personal account will be deleted without
reading.
After furious head scratching, Bob Barnes asked:
| What is the Outlook method to add an Access Unbound textbox (used for
| a "message") in automation.
|
| I have....
| Dim Outl As Outlook.Application, MyMail As Outlook.MailItem, N$
| On Error GoTo AAA1
| N = "C:\BobDev\Sales" & Format(BegDaily, "mmddyy") & "_" &
| Format(EndDaily, "mmddyy") & ".snp"
| DoCmd.OutputTo acOutputReport, "DailySummary", _
| "Snapshot Format", N, False
| Set Outl = CreateObject("Outlook.Application")
| Set MyMail = Outl.CreateItem(olMailItem)
| MyMail.To = "(E-Mail Removed)"
| MyMail.Subject = "Sales Summary" & Format(BegDaily, "mm_dd_yy") & "_"
| & Format(EndDaily, "mm_dd_yy")
| MyMail.Attachments.Add N
| 'MyMail.Display
| SendKeys "^{ENTER}"
| Set Outl = Nothing: Set MyMail = Nothing
| AAA2:
| Screen.MousePointer = 1: Exit Sub
| AAA1:
| Select Case Err
| Case Else
| MsgBox "Error Number " & Err.Number & " " & Err.Description: Resume
| 'AAA2 End Select
|
| TIA - Bob
|