Re: Excel 2007 and cdo 1.2.1?
- From: "Ron de Bruin" <rondebruin@xxxxxxxxxxxx>
- Date: Thu, 1 Mar 2007 19:19:41 +0100
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" <MarkJ@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:A4FBA12A-512C-435F-B14D-CE0A2271DF16@xxxxxxxxxxxxxxxx
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 = "me@xxxxxxxx"
.CC = ""
.BCC = ""
.From = "Mark"" <me@xxxxxxxx>"
.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
- Prev by Date: Automatic Refresh Question
- Next by Date: Re: Rogue name
- Previous by thread: Automatic Refresh Question
- Next by thread: Re: Rogue name
- Index(es):
Loading