Harry Merkin
--
Bill R MVP
"Steve" <St...@discussions.microsoft.com> wrote in message
news:14C2C2A2-FC13-46A2...@microsoft.com...
On Error Resume Next
Set ThisItem = Application.ActiveWindow.CurrentItem
Set Fwditem = ThisItem.Forward
Fwditem.To = "the_n...@yahoo.com"
Fwditem.HTMLBody = "Here's more for you." & vbCrLf & HTMLBody
Fwditem.Send
Fwditem.Delete
I think there is a variable in the first line that I could set but ZI don't
know which one or what parameters to use. Can anyone help?
"BillR [MVP]" wrote:
> > Steve
>
>
>
--
Bill R MVP
"Steve" <St...@discussions.microsoft.com> wrote in message
news:757FD8E6-6029-4861...@microsoft.com...
--
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
Sub SendHome()
Dim objApp As Outlook.Application
Set objApp = Application
'Set objApp = CreateObject("Outlook.Application")
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
Case Else
' anything else will result in an error, which is
' why we have the error handler above
End Select
Set objApp = Nothing
On Error Resume Next
'Set ThisItem = Application.ActiveInspector.CurrentItem
Set ThisItem = Application.ActiveWindow.CurrentItem
Set Fwditem = ThisItem.Forward
Fwditem.To = "Ma...@yahoo.com"
Fwditem.HTMLBody = "Here's more for you." & vbCrLf & HTMLBody
Fwditem.Send
Fwditem.Delete
Obviously I'm just not getting this. any help would be appreciated.
End Sub
Set ThisItem = GetCurentItem()
Set Fwditem = ThisItem.Forward
' etc.
--
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
"Steve" <St...@discussions.microsoft.com> wrote in message news:C9FE30BD-F891-4303...@microsoft.com...
It goes before any code that works with the current item.The idea is to use the GetCurrentItem() function to return the current as an object that subsequent code can then act upon, as in the snippet I posted earlier as an example.
> And wht do I need to put in the ()?
NOthing. Look again at the usage example for the GetCurrentItem() function.