S
SkyEyes
We have several templates with a VB fill-in form that eventually gets send
via email. We just are moving to Outlook 2003 from Groupwise and receive the
message "A program is trying to access e-mail addresses you have stored in
Outlook. Do you want to allow this?
When have to check the check box and select YES for access. We want users
to not have to receive this message. We still have several users utilizing
Groupwise so we can't attach the Outlook Reference library. Here is the code
we were using below. We also want people at home to be able to utilize these
forms and they might not have outlook. Any suggestions without receiving the
prompt above.
Sub OutLK()
Dim objOL As Object
Dim objLO As Object
Dim objMessage As Object
On Error GoTo ErrorHandle
Set objOL = CreateObject("outlook.application")
Set objLO = objOL.CreateItem(0)
objLO.Display
With objLO
.Subject = strSubject
.Recipients.Add strRecip 'emails correct recipient
.Body = strBody
.attachments.Add (ActiveDocument.FullName)
.Send
End With
Exit Sub
Exit_errorHandle:
Exit Sub
'handles error sending email
ErrorHandle:
MsgBox Err.Description & Err.Number
MsgBox "Email Malfunction, please contact the Help Desk.", vbOKOnly
Resume Exit_errorHandle
End Sub
via email. We just are moving to Outlook 2003 from Groupwise and receive the
message "A program is trying to access e-mail addresses you have stored in
Outlook. Do you want to allow this?
When have to check the check box and select YES for access. We want users
to not have to receive this message. We still have several users utilizing
Groupwise so we can't attach the Outlook Reference library. Here is the code
we were using below. We also want people at home to be able to utilize these
forms and they might not have outlook. Any suggestions without receiving the
prompt above.
Sub OutLK()
Dim objOL As Object
Dim objLO As Object
Dim objMessage As Object
On Error GoTo ErrorHandle
Set objOL = CreateObject("outlook.application")
Set objLO = objOL.CreateItem(0)
objLO.Display
With objLO
.Subject = strSubject
.Recipients.Add strRecip 'emails correct recipient
.Body = strBody
.attachments.Add (ActiveDocument.FullName)
.Send
End With
Exit Sub
Exit_errorHandle:
Exit Sub
'handles error sending email
ErrorHandle:
MsgBox Err.Description & Err.Number
MsgBox "Email Malfunction, please contact the Help Desk.", vbOKOnly
Resume Exit_errorHandle
End Sub