Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Outlook Redemption (http://www.outlookbanter.com/outlook-vba/8481-outlook-redemption.html)

fgibbcollins March 16th 06 06:38 PM

Outlook Redemption
 
In Access I have the following code in the click event of a command button.
It copies the body of an email message selected in an Outlook View Control
into a cooresponding memo field on the form. It works fine, but I want to
get rid of the Outlook security pop ups. I've downloaded and installed
Outlook Redemption, but I can't figure out where to insert the code and which
safe object to use. Redemption doesn't have a safeSelection or safeItem.
Any assistance would be greatly appreaciated.
Thanks,
Frank

Private Sub CmdCopyEmail_Click()
Dim CopyItem As Outlook.Selection
Dim CopyMail As Object
Dim x As Integer

With OutlookViewCtl
Set CopyItem = OutlookViewCtl.Selection
For x = 1 To CopyItem.Count
Notes = CopyItem.Item(x).Body
Next x
End With
End Sub


Sue Mosher [MVP-Outlook] March 16th 06 06:43 PM

Outlook Redemption
 
Something like this:

Set CopyItem = OutlookViewCtl.Selection
Set sMail = CreateObject("Redemption.SafeMailItem")
For Each itm in CopyItem
sMail.Item = itm
Notes = Notes & vbCrLf & vbCrLf & sMail.Body
Next
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"fgibbcollins" wrote in message ...
In Access I have the following code in the click event of a command button.
It copies the body of an email message selected in an Outlook View Control
into a cooresponding memo field on the form. It works fine, but I want to
get rid of the Outlook security pop ups. I've downloaded and installed
Outlook Redemption, but I can't figure out where to insert the code and which
safe object to use. Redemption doesn't have a safeSelection or safeItem.
Any assistance would be greatly appreaciated.
Thanks,
Frank

Private Sub CmdCopyEmail_Click()
Dim CopyItem As Outlook.Selection
Dim CopyMail As Object
Dim x As Integer

With OutlookViewCtl
Set CopyItem = OutlookViewCtl.Selection
For x = 1 To CopyItem.Count
Notes = CopyItem.Item(x).Body
Next x
End With
End Sub


fgibbcollins March 16th 06 07:03 PM

Outlook Redemption
 
That works! Thanks Sue, you are an MVP

"Sue Mosher [MVP-Outlook]" wrote:

Something like this:

Set CopyItem = OutlookViewCtl.Selection
Set sMail = CreateObject("Redemption.SafeMailItem")
For Each itm in CopyItem
sMail.Item = itm
Notes = Notes & vbCrLf & vbCrLf & sMail.Body
Next
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"fgibbcollins" wrote in message ...
In Access I have the following code in the click event of a command button.
It copies the body of an email message selected in an Outlook View Control
into a cooresponding memo field on the form. It works fine, but I want to
get rid of the Outlook security pop ups. I've downloaded and installed
Outlook Redemption, but I can't figure out where to insert the code and which
safe object to use. Redemption doesn't have a safeSelection or safeItem.
Any assistance would be greatly appreaciated.
Thanks,
Frank

Private Sub CmdCopyEmail_Click()
Dim CopyItem As Outlook.Selection
Dim CopyMail As Object
Dim x As Integer

With OutlookViewCtl
Set CopyItem = OutlookViewCtl.Selection
For x = 1 To CopyItem.Count
Notes = CopyItem.Item(x).Body
Next x
End With
End Sub




All times are GMT +1. The time now is 08:28 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com