On Thu, 30 Oct 2008 11:04:44 GMT, "JOHNNY OUTING" <outingjr@att.n et>
wrote:
You managed to violate several netiquette rules in one post. Please
review http://www.mvps.org/access/netiquette.htm
This is a text-only newsgroup (you could have captured the error
message with Ctrl+C), and if you can't be bothered to check back for
messages, why would we make the effort to answer in the first place?
RunCode is designed to call a public FUNCTION, not a sub.
Also make sure you check the results of CreateObject; don't assume it
works:
if appOutlook is nothing then
Msgbox "Aarrrrcchh h, Outlook not installed?"
else
Set MailOutlook... etc.
end if
..To takes a string, like "mailbox@domain "
-Tom.
Microsoft Access MVP
wrote:
You managed to violate several netiquette rules in one post. Please
review http://www.mvps.org/access/netiquette.htm
This is a text-only newsgroup (you could have captured the error
message with Ctrl+C), and if you can't be bothered to check back for
messages, why would we make the effort to answer in the first place?
RunCode is designed to call a public FUNCTION, not a sub.
Also make sure you check the results of CreateObject; don't assume it
works:
if appOutlook is nothing then
Msgbox "Aarrrrcchh h, Outlook not installed?"
else
Set MailOutlook... etc.
end if
..To takes a string, like "mailbox@domain "
-Tom.
Microsoft Access MVP
>Below is a sample code that processes an Email using Microsoft Outlook in the background. From this code I've done the following:
a.. The database it is incorporated into is a MSAccess '97 multi-user secured database that is used in a Citrix Environment
b.. I've incorporated this code into a Module.
a.. From the Menu in the Design view of this module, I select --Tools --References --"Microsoft Outlook 8.0 Object Library"
c.. From the command button on one of my Forms, it processes a macro using "Runcode" TestMail ().
d.. When I test the code using the command button it works for me
e.. I've given the other users permission to the module where the code is stored but the code only works for me and not the other users
a.. NOTE: prior to me using this "Runcode", I used the macro "SendMail" and it works for all the users
>The problem is when the other users try using this same command button that processes this module by using the macro "Runcode" - testmail(), it gives the following run-time error message: "Run-time error '-2147287035 (80030005)': You don't have appropriate permission to perform this operation." HELP!!!!!!!!
>
>
>P.S. When you post to your newsgroup, please also reply to this email address as well: johnny.outing-jr@boeing.ksc.n asa.gov
>
>Thanks
>
>
>--------------------------------------------------------------------------------
>
>'============= =============== =============== ===============
>
>Public Sub TestMail()
>
Dim appOutLook As Object
>
Dim MailOutLook As Object
>
Dim strMSG As String
>
>
>
Set appOutLook = CreateObject("O utlook.Applicat ion")
>
Set MailOutLook = appOutLook.Crea teItem(olMailIt em)
>
strMSG = "How are you, my friend!"
>
With MailOutLook
>
.To = mailbox@domain
>
.Subject = "hello"
>
.Body = strMSG
>
.Send
>
End With
>
Set appOutLook = Nothing
>
>End Sub
>
>'============= =============== =============== =============== ==
>
>
>
>
>
a.. The database it is incorporated into is a MSAccess '97 multi-user secured database that is used in a Citrix Environment
b.. I've incorporated this code into a Module.
a.. From the Menu in the Design view of this module, I select --Tools --References --"Microsoft Outlook 8.0 Object Library"
c.. From the command button on one of my Forms, it processes a macro using "Runcode" TestMail ().
d.. When I test the code using the command button it works for me
e.. I've given the other users permission to the module where the code is stored but the code only works for me and not the other users
a.. NOTE: prior to me using this "Runcode", I used the macro "SendMail" and it works for all the users
>The problem is when the other users try using this same command button that processes this module by using the macro "Runcode" - testmail(), it gives the following run-time error message: "Run-time error '-2147287035 (80030005)': You don't have appropriate permission to perform this operation." HELP!!!!!!!!
>
>
>P.S. When you post to your newsgroup, please also reply to this email address as well: johnny.outing-jr@boeing.ksc.n asa.gov
>
>Thanks
>
>
>--------------------------------------------------------------------------------
>
>'============= =============== =============== ===============
>
>Public Sub TestMail()
>
Dim appOutLook As Object
>
Dim MailOutLook As Object
>
Dim strMSG As String
>
>
>
Set appOutLook = CreateObject("O utlook.Applicat ion")
>
Set MailOutLook = appOutLook.Crea teItem(olMailIt em)
>
strMSG = "How are you, my friend!"
>
With MailOutLook
>
.To = mailbox@domain
>
.Subject = "hello"
>
.Body = strMSG
>
.Send
>
End With
>
Set appOutLook = Nothing
>
>End Sub
>
>'============= =============== =============== =============== ==
>
>
>
>
>
Comment