My Assistant
![]() ![]() |
|
|
Jan 31 2008, 07:56 PM
Post
#1
|
|
|
UtterAccess Member Posts: 34 |
I am having a problem when trying to automate an email. The outlook security msg pops up and if I click yes everything is ok.
However, if I click "NO" then I get runtime error 287. Any assistance would be appreciated. Below is a copy of my code. Private Sub Text102_AfterUpdate() Dim mess_body As String Dim appOutLook As Outlook.Application Dim MailOutLook As Outlook.MailItem Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) Dim strReqEmail As String strReqEmail = (DLookup("[chrEmailAddress]", "tblRequestors", "[chrRequestorName] = [Forms]![frmSCMRTRequest]![Requestor Name]")) Set appOutLook = CreateObject("Outlook.Application") Set MailOutLook = appOutLook.CreateItem(olMailItem) With MailOutLook .BodyFormat = olFormatRichText .To = strReqEmail .Subject = "Request " & [Forms]![frmSCMRTRequest]!RQST_NBR & " has been assigned " & Me.Text102 .HTMLBody = "Your request has been assigned " & Me.Text102 & " and is continuing through the process" & _ " and you will be notified if there is any delay." '.DeleteAfterSubmit = True 'This would let Outlook send the note without storing .Send End With 'MsgBox MailOutLook.Body End Sub |
|
|
|
Jan 31 2008, 09:35 PM
Post
#2
|
|
|
UtterAccess VIP Posts: 4,622 From: North Carolina, USA |
|
|
|
|
Jan 31 2008, 09:49 PM
Post
#3
|
|
|
UtterAccess Member Posts: 34 |
Thank you!
|
|
|
|
Jan 31 2008, 11:56 PM
Post
#4
|
|
|
UtterAccess VIP Posts: 4,622 From: North Carolina, USA |
You're Welcome! (IMG:http://www.utteraccess.com/forum/style_emoticons/default/thumbup.gif) Good luck with your project!
|
|
|
|
Feb 1 2008, 09:13 AM
Post
#5
|
|
|
UtterAccess Ruler Posts: 1,078 From: United States - IA |
Frank Kegley (a member here at UA) provided the below link to a website as another option to getting around Outlook security.
Outlook Security Bypass I thought I would throw it out as another option. Chad |
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 10:17 AM |