R
Raymond
Hi
I've created this code that will execute when a bottun on a uferform is
clicked
Private Sub CommandButton1_Click()
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.Subject = TextBox1.Text
myitem.To = TextBox2.Text
Filename = TextBox1.Text & Textbox3.text
myitem.saves "c:\temp\" & filename & ".msg" , olmsg
Unload Me
myitem.Display
End Sub
Because the e-mail doesn't heve any message text I don't want to send
it direct.
I know that it's possible to use the event itemsend to do somethings
What I want know is wheren do I have to put the Private Sub
myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
I've created this code that will execute when a bottun on a uferform is
clicked
Private Sub CommandButton1_Click()
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
myitem.Subject = TextBox1.Text
myitem.To = TextBox2.Text
Filename = TextBox1.Text & Textbox3.text
myitem.saves "c:\temp\" & filename & ".msg" , olmsg
Unload Me
myitem.Display
End Sub
Because the e-mail doesn't heve any message text I don't want to send
it direct.
I know that it's possible to use the event itemsend to do somethings
What I want know is wheren do I have to put the Private Sub
myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)