Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Outlook - Object Model Guardian

Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Outlook - Object Model Guardian


Redemption is the best solution I know of. It provides a DLL that
exposes a copy of the Outlook object model but one without an object model
guard. It's free for development/personal use and $199 for a redistributable
version.

http://www.dimastr.com/redemption/

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Braindeadbeachbum" wrote in
message ...
Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the
following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Outlook - Object Model Guardian

Hi Rob

I installed Redemption but had some hassels getting it to work and got
frustrated. I thought maybe there's an easier way of doing this like a
setting within Outlook or disabling an Outlook function... Back to Redemption
I guess.

Thanks

"Rob Bovey" wrote:


Redemption is the best solution I know of. It provides a DLL that
exposes a copy of the Outlook object model but one without an object model
guard. It's free for development/personal use and $199 for a redistributable
version.

http://www.dimastr.com/redemption/

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Braindeadbeachbum" wrote in
message ...
Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the
following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Outlook - Object Model Guardian

Try CDO
http://www.rondebruin.nl/cdo.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Braindeadbeachbum" wrote in message
...
Hi Rob

I installed Redemption but had some hassels getting it to work and got
frustrated. I thought maybe there's an easier way of doing this like a
setting within Outlook or disabling an Outlook function... Back to Redemption
I guess.

Thanks

"Rob Bovey" wrote:


Redemption is the best solution I know of. It provides a DLL that
exposes a copy of the Outlook object model but one without an object model
guard. It's free for development/personal use and $199 for a redistributable
version.

http://www.dimastr.com/redemption/

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Braindeadbeachbum" wrote in
message ...
Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the
following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Outlook - Object Model Guardian

Ron for president!

"Ron de Bruin" wrote:

Try CDO
http://www.rondebruin.nl/cdo.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Braindeadbeachbum" wrote in message
...
Hi Rob

I installed Redemption but had some hassels getting it to work and got
frustrated. I thought maybe there's an easier way of doing this like a
setting within Outlook or disabling an Outlook function... Back to Redemption
I guess.

Thanks

"Rob Bovey" wrote:


Redemption is the best solution I know of. It provides a DLL that
exposes a copy of the Outlook object model but one without an object model
guard. It's free for development/personal use and $199 for a redistributable
version.

http://www.dimastr.com/redemption/

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Braindeadbeachbum" wrote in
message ...
Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the
following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Outlook - Object Model Guardian

Do you want to be the vice president <vbg


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Braindeadbeachbum" wrote in message
...
Ron for president!

"Ron de Bruin" wrote:

Try CDO
http://www.rondebruin.nl/cdo.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Braindeadbeachbum" wrote in message
...
Hi Rob

I installed Redemption but had some hassels getting it to work and got
frustrated. I thought maybe there's an easier way of doing this like a
setting within Outlook or disabling an Outlook function... Back to Redemption
I guess.

Thanks

"Rob Bovey" wrote:


Redemption is the best solution I know of. It provides a DLL that
exposes a copy of the Outlook object model but one without an object model
guard. It's free for development/personal use and $199 for a redistributable
version.

http://www.dimastr.com/redemption/

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm

"Braindeadbeachbum" wrote in
message ...
Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the
following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook - Object Model Guardian

On Tue, 9 May 2006 04:31:01 -0700, Braindeadbeachbum
wrote:

Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!


Also do a search for Express ClickYes. I have been using this for a
awhile with good results.
Gary Dyrkacz

Radio Control Aircraft/Paintball Physics/Paintball for 40+
http://home.comcast.net/~dyrgcmn/
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Outlook - Object Model Guardian

Hi Gary

Thanks, I will have a look but Ron's page showed me the light.



"Gary Dyrkacz" wrote:

On Tue, 9 May 2006 04:31:01 -0700, Braindeadbeachbum
wrote:

Hi Guys

I'm running Office 2003 and need to automate the sending of a notification
e-mail to myself when ever my code receives and error. I used the following
code but this screen keeps popping up saying: A program is trying to
automatically send e-mail on your behalf. Do you want to allow this?...

I think it's the "Outlook - Object Model Guardian" requesting this
confirmation.

Is there any work around as this e-mail needs to go out without any human
interaction?

Private Sub SendErrorEmail()
Dim objOutlook As New Outlook.Application
Dim objMail As MailItem
Dim strMessage As String

Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)

strMessage = "Jan," & Chr(13) & Chr(13)
strMessage = strMessage & "This is just a test." & Chr(13) & Chr(13)
strMessage = strMessage & "Cheers. Jan"

With objMail
.To = "
.Subject = "Testing"
.Body = strMessage
.Display
.Send
End With

Set objMail = Nothing
Set objOutlook = Nothing

End Sub

Please help!!


Also do a search for Express ClickYes. I have been using this for a
awhile with good results.
Gary Dyrkacz

Radio Control Aircraft/Paintball Physics/Paintball for 40+
http://home.comcast.net/~dyrgcmn/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusion about how the Window object fits into the Excel object model Josh Sale Excel Programming 11 April 15th 05 06:08 PM
Chart Object Model Joe Maki Excel Programming 4 February 28th 05 09:52 PM
Excel object model Alan Hutchins Excel Programming 0 September 17th 04 11:32 AM
Subtotals in object model? Josh Sale Excel Programming 2 October 21st 03 11:11 PM
Does MS Query have an object model Frank[_12_] Excel Programming 2 July 10th 03 10:54 PM


All times are GMT +1. The time now is 03:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"