G
Guest
Hi,
I am trying to create an Excel script that will launch an e-mail and populate the fields with the values of specific cells. My knowledge of the Outlook object model, let alone my rudimentary knowledge of VBA is letting me down.
So far, I have the following to launch the e-mail but now I'm a little stuck: -
-----------------------------------------------------------------------
Sub CommandButton1_Click()
Dim ol As Outlook.Application
Dim itm As Object
Set ol = New Outlook.Application
Set itm = ol.CreateItemFromTemplate _
("C:\Documents and Settings\Mike\Desktop\Test.oft")
With itm
.To = "(e-mail address removed)"
.Subject = "Test"
.Display
End With
Set itm = Nothing
Set ol = Nothing
End Sub
-----------------------------------------------------------------------
I need to be able to reference the UserProperties of the form Items and specify the values of those fields.
Can anyone shed a little light, please? Your help, as always, would be most appreciated.
Mike.
I am trying to create an Excel script that will launch an e-mail and populate the fields with the values of specific cells. My knowledge of the Outlook object model, let alone my rudimentary knowledge of VBA is letting me down.
So far, I have the following to launch the e-mail but now I'm a little stuck: -
-----------------------------------------------------------------------
Sub CommandButton1_Click()
Dim ol As Outlook.Application
Dim itm As Object
Set ol = New Outlook.Application
Set itm = ol.CreateItemFromTemplate _
("C:\Documents and Settings\Mike\Desktop\Test.oft")
With itm
.To = "(e-mail address removed)"
.Subject = "Test"
.Display
End With
Set itm = Nothing
Set ol = Nothing
End Sub
-----------------------------------------------------------------------
I need to be able to reference the UserProperties of the form Items and specify the values of those fields.
Can anyone shed a little light, please? Your help, as always, would be most appreciated.
Mike.