Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Problem
Sub SendMail()
Dim objOutlook As Object Dim objMailItem As Object Dim objRecipient As Object Set objOutlook = CreateObject("Outlook.Application") Set objMailItem = objOutlook.CreateItem(0) Set objRecipient = objMailItem.Recipients.Add _ (ActiveSheet.Range("B2").Value) objRecipient.Type = 1 '1 = To, use 2 for cc objMailItem.Subject = "The extract has finished." 'Instead of the path to the file - I want to insert Active Workbook in the next line objMailItem.Attachments.Add _ ("C:\Al Jager\! BookTest1.xls") objMailItem.Display 'change to .Send if you don't want to interact End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
MACRO PROBLEM ??? | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro problem | Excel Worksheet Functions | |||
Run a macro problem? | Excel Programming |