Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2003 is causing me an error with below code, I get a debug on the
Outlook.Application, Outlook.MailItem and Chr(10) coding. Even in the Help Files Outlook.Application is indicated to be used and Chr(10) is discussed which you would thing would be standard. All three work fine in Excel 97 to 2002, but if someone on the team has Excel 2003 and even sends the file back to someone with 2002, the email will not generate. Any assistance would be appreciated. Sub Mail_workbook_Outlook(MgrsEmail As String, Name As String) Dim outApp As Outlook.Application Dim outMail As Outlook.MailItem Set outApp = CreateObject("Outlook.Application") Set outMail = outApp.CreateItem(olMailItem) With outMail .To = MgrsEmail .CC = "" .BCC = "" .Subject = " Survey" .Body = "An Audit was completed in your " & Name & " Location by the Operations Team." & Chr(10) & Chr(10) & _ "One of the many goals of Operations Team is to provide a high quality, valued service to our sales management team. Your comments will enable us to determine how well we are achieving this goal and will be helpful when providing services in the future." & Chr(10) & Chr(10) & _ "Your time and cooperation are appreciated." & Chr(10) & Chr(10) & _ "Thank you," & Chr(10) & Chr(10) & "Operations Team" .Attachments.Add ActiveWorkbook.FullName .Send End With Set outMail = Nothing Set outApp = Nothing End Sub |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure about 2003 but have you tried using vbCR instead of chr(10) ?
Also vbLF or vbCRLF are possible. -- Cheers Nigel "wmw" wrote in message ... Excel 2003 is causing me an error with below code, I get a debug on the Outlook.Application, Outlook.MailItem and Chr(10) coding. Even in the Help Files Outlook.Application is indicated to be used and Chr(10) is discussed which you would thing would be standard. All three work fine in Excel 97 to 2002, but if someone on the team has Excel 2003 and even sends the file back to someone with 2002, the email will not generate. Any assistance would be appreciated. Sub Mail_workbook_Outlook(MgrsEmail As String, Name As String) Dim outApp As Outlook.Application Dim outMail As Outlook.MailItem Set outApp = CreateObject("Outlook.Application") Set outMail = outApp.CreateItem(olMailItem) With outMail .To = MgrsEmail .CC = "" .BCC = "" .Subject = " Survey" .Body = "An Audit was completed in your " & Name & " Location by the Operations Team." & Chr(10) & Chr(10) & _ "One of the many goals of Operations Team is to provide a high quality, valued service to our sales management team. Your comments will enable us to determine how well we are achieving this goal and will be helpful when providing services in the future." & Chr(10) & Chr(10) & _ "Your time and cooperation are appreciated." & Chr(10) & Chr(10) & _ "Thank you," & Chr(10) & Chr(10) & "Operations Team" .Attachments.Add ActiveWorkbook.FullName .Send End With Set outMail = Nothing Set outApp = Nothing End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? | Excel Discussion (Misc queries) | |||
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message | Excel Discussion (Misc queries) | |||
Display mail application either in Outlook, or Outlook express | Excel Programming | |||
Programming a console application | Excel Programming | |||
programming outlook 2000 from excel | Excel Programming |