Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Analysis Toolpack Issues in Excel 2007 (Office 2007 Enterprise) Ben Shields Excel Discussion (Misc queries) 2 February 24th 09 05:04 PM
Excel 2007 files not showing on screen when opened in Excel 2007 [email protected] Setting up and Configuration of Excel 1 January 8th 09 05:45 PM
Conflict in excel 2007 with Outlook 2007 attachment excel narnimar Excel Discussion (Misc queries) 0 December 17th 08 02:02 PM
Labels: Unable to import all records Excel 2007 to Word 2007 Mailm skelly Excel Discussion (Misc queries) 1 October 29th 08 11:22 PM
Excel 2007 Macro Help (Excel 2003 not working in 2007) Pman Excel Discussion (Misc queries) 4 May 29th 08 06:29 PM


All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"