Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get an error on the ActiveWorkbook.Sheets("Impulse").Export _
Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
Which Windows and Excel version do you use -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... I get an error on the ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
windows xp and excell2003
"Ron de Bruin" wrote: Hi John Which Windows and Excel version do you use -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... I get an error on the ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John
I test it on a machine with your Win/Excel version without problems Do you have another machine to test it on ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... windows xp and excell2003 "Ron de Bruin" wrote: Hi John Which Windows and Excel version do you use -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... I get an error on the ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = " .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
unfortunatly I get the same thing... strange. Do I need any VBA options
checked? "Ron de Bruin" wrote: Hi John I test it on a machine with your Win/Excel version without problems Do you have another machine to test it on ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... windows xp and excell2003 "Ron de Bruin" wrote: Hi John Which Windows and Excel version do you use -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... I get an error on the ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = "" .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can you send me the file private John
I will test it for you then -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... unfortunatly I get the same thing... strange. Do I need any VBA options checked? "Ron de Bruin" wrote: Hi John I test it on a machine with your Win/Excel version without problems Do you have another machine to test it on ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... windows xp and excell2003 "Ron de Bruin" wrote: Hi John Which Windows and Excel version do you use -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John" wrote in message ... I get an error on the ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" ... line saying error 438 Sub emailimpulse() 'Working in 2000-2007 Dim OutApp As Object Dim OutMail As Object Dim Fname As String Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) 'fill in the file path/name of the gif file Fname = "C:\My_impulse.gif" 'Save Chart sheet as Gif file ActiveWorkbook.Sheets("Impulse").Export _ Filename:=Fname, FilterName:="GIF" On Error Resume Next With OutMail .To = "" .CC = "" .BCC = "" .Subject = "Impulse" & " " & Format(Now, "mm-dd-yy h:mm:ss") .Body = "" .Attachments.Add Fname .display 'or use .Display End With On Error GoTo 0 Kill Fname Set OutMail = Nothing Set OutApp = Nothing End Sub CAN you help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Email code | Excel Worksheet Functions | |||
VBA code to CC email | Excel Programming | |||
Need help with email code (PLEASE) | Excel Programming | |||
Email VBA Code | Excel Programming | |||
VBA Code for Email | Excel Programming |