View Single Post
  #1  
Old December 14th 06, 06:53 PM posted to microsoft.public.outlook.program_vba
Jeff C
external usenet poster
 
Posts: 32
Default Open Email For Edit????

I am using the following to send a simple text report in the message body of
an Outlook email (Office 2003) from an MS Access database tool. Because of
the security features I get the warning about something trying to send an
email which requires the user to acknowledge by clicking on the yes button.
I know about the “ClickYes” program but I would much rather just have the
email open for editing requiring the user to manually send the email rather
than getting the warning message.

Is there any modification or change I could implement to the code below that
will make this happen? Thank you very much.

DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70

DoCmd.OutputTo acOutputReport, "MyAccessReport", acFormatRTF, "Full Path To
MyAccessReport"

Dim wdApp As Word.Application
Dim doc As Word.Document
Dim Report As MailItem

Set wdApp = New Word.Application
Set doc = wdApp.Documents.Open("Full Path To MyAccessReport ")
Set Report = doc.MailEnvelope.Item

Report.To = [Forms]![MyAccessForm].[txtEmail]
Report.Subject = "MyEmailSubject"
Report.Display
Report.Send

wdApp.Quit False
Set doc = Nothing
Set wdApp = Nothing

DoCmd.Close
Application.Quit acQuitSaveAll

--
Jeff C
Live Well .. Be Happy In All You Do
Ads