Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 and cdo 1.2.1?
i have the following code, it worked under windows 2000 and office 2003, but
i had to upgrade server at work to windows 2003 and office 2007, now code does not work, it tells me {.Send} is not supported. any ideas or workarounds? Dim NewWb As Workbook Dim iMsg As Object Dim WBname As String Public Sub Process() Sheets(Array("Moscad", "Opto")).Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Sheets(Array("Moscad", "Opto")).Copy Set NewWb = ActiveWorkbook WBname = " " & Format(Now() - 1, "ddmmyyyy") & ".xls" NewWb.SaveCopyAs "C:/" & WBname Set iMsg = CreateObject("CDO.Message") With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = "Mark"" " .Subject = "Report" .TextBody = "" .AddAttachment "C:/" & WBname .Send End With Kill "C:/" & WBname Set iMsg = Nothing Set iConf = Nothing Set wb = Nothing Application.ScreenUpdating = True Application.DisplayAlerts = False Application.Quit End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 2007 and cdo 1.2.1?
Hi Mark
This is CDO for Windows 2000 See http://www.rondebruin.nl/cdo.htm You must use the commented lines in the code to fill in your smtp server and maybe a password ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Mark J" wrote in message ... i have the following code, it worked under windows 2000 and office 2003, but i had to upgrade server at work to windows 2003 and office 2007, now code does not work, it tells me {.Send} is not supported. any ideas or workarounds? Dim NewWb As Workbook Dim iMsg As Object Dim WBname As String Public Sub Process() Sheets(Array("Moscad", "Opto")).Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Sheets(Array("Moscad", "Opto")).Copy Set NewWb = ActiveWorkbook WBname = " " & Format(Now() - 1, "ddmmyyyy") & ".xls" NewWb.SaveCopyAs "C:/" & WBname Set iMsg = CreateObject("CDO.Message") With iMsg Set .Configuration = iConf .To = " .CC = "" .BCC = "" .From = "Mark"" " .Subject = "Report" .TextBody = "" .AddAttachment "C:/" & WBname .Send End With Kill "C:/" & WBname Set iMsg = Nothing Set iConf = Nothing Set wb = Nothing Application.ScreenUpdating = True Application.DisplayAlerts = False Application.Quit End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Analysis Toolpack Issues in Excel 2007 (Office 2007 Enterprise) | Excel Discussion (Misc queries) | |||
Excel 2007 files not showing on screen when opened in Excel 2007 | Setting up and Configuration of Excel | |||
Conflict in excel 2007 with Outlook 2007 attachment excel | Excel Discussion (Misc queries) | |||
Labels: Unable to import all records Excel 2007 to Word 2007 Mailm | Excel Discussion (Misc queries) | |||
Excel 2007 Macro Help (Excel 2003 not working in 2007) | Excel Discussion (Misc queries) |