Advertisement
Advertisement
| 07.23.2008 at 12:16PM PDT, ID: 23589789 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: |
Public Sub Application_Startup()
' Reference the items in the Inbox. Because myOlItems is declared
' "WithEvents" the ItemAdd event will fire below.
Set myOlItems = Outlook.Session.GetDefaultFolder(olFolderInbox).Items
End Sub
Sub Forward2Ed()
Dim myOlApp As New Outlook.Application
Dim myItem, myForward As Object
Set myItem = myOlApp.ActiveExplorer.Selection.Item(1)
Set myForwarditem = myItem.Forward
myForwarditem.To = "ed@xxxxx.com"
myForwarditem.Save
Set objSafeMail = CreateObject("Redemption.SafeMailItem")
objSafeMail.Item = myForwarditem
objSafeMail.Send
Set myItem = Nothing
Set myForward = Nothing
MsgBox "Message Forwarded" ' I would include this line for testing
End Sub
|