Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Combobox1 is populated with sheet names. The user will
select a sheetname from the combobox. What is the code that will attach the sheet that is in combobox1 and bring up an outlook email dialog box. I want the email dialog box to have the subject of "Stats" and an empty body and To address field. For example, the user clicks the combobox and selects the value "Todd Huttenstine". When the code is run, it must attach worksheet "Todd Huttenstine" to the email. Below is the code I have so far, but I want my email address taken out. When I take it out I get an error. Can anyone please show me the modified code to perform the task? Option Explicit Private Sub CommandButton1_Click() Dim objSession As Object, objMessage As Object, objOneRecip As Object Set objSession = CreateObject("MAPI.Session") objSession.Logon Set objMessage = objSession.Outbox.Messages.Add objMessage.Subject = "Stats" objMessage.Text = "" Set objOneRecip = objMessage.Recipients.Add objOneRecip.Name = " objOneRecip.Type = 1 objOneRecip.Resolve objMessage.Send showDialog:=True objSession.Logoff End Sub Thank you Todd Huttenstine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
modification to this code | Excel Discussion (Misc queries) | |||
Code modification help | Excel Worksheet Functions | |||
line code modification | Excel Discussion (Misc queries) | |||
VBA modification for IMAP email accont | Excel Discussion (Misc queries) | |||
Modification to code | Excel Programming |