Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble with emailling in XP
I have been using this email macro for three years on our system without any
problems. We have using Windows 2000, but the newer computers we have purchased are running XP. The macro works fine with the 2000 computers, but falls down on the XP systems @ ActiveWorkbook.SendMail "data", _ Fullname Here is what I have. ' Macro makes a copy of this sheet, takes incident number and surname ' creates a date and time string, saves active sheet using inc.# and surname ' and emails this sheet. Sub Mail_ActiveSheet() Dim strdate As String Dim FName1, FName2, Fullname FName1 = Range("AU2").Value & "-" FName2 = Range("I4").Value Fullname = FName1 & FName2 ActiveSheet.Copy strdate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss") ActiveSheet.SaveAs "this Sheet for " & Fullname _ & " " & strdate & ".xls" ActiveWorkbook.SendMail "data", _ Fullname ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook.Fullname ActiveWorkbook.Close False End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Trouble with emailling in XP
Hi Tim
Do you get a arror ? If you test a example from my site do you have the same problem then ? http://www.rondebruin.nl/mail/folder1/mail2.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Tim" wrote in message ... I have been using this email macro for three years on our system without any problems. We have using Windows 2000, but the newer computers we have purchased are running XP. The macro works fine with the 2000 computers, but falls down on the XP systems @ ActiveWorkbook.SendMail "data", _ Fullname Here is what I have. ' Macro makes a copy of this sheet, takes incident number and surname ' creates a date and time string, saves active sheet using inc.# and surname ' and emails this sheet. Sub Mail_ActiveSheet() Dim strdate As String Dim FName1, FName2, Fullname FName1 = Range("AU2").Value & "-" FName2 = Range("I4").Value Fullname = FName1 & FName2 ActiveSheet.Copy strdate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss") ActiveSheet.SaveAs "this Sheet for " & Fullname _ & " " & strdate & ".xls" ActiveWorkbook.SendMail "data", _ Fullname ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook.Fullname ActiveWorkbook.Close False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I keep hyperlinks when emailling a file? | Excel Discussion (Misc queries) | |||
IRR Trouble | Excel Worksheet Functions | |||
Packaging Word & Excel files for emailling to preserve links | Excel Discussion (Misc queries) | |||
Trouble with IF | Excel Worksheet Functions | |||
Emailling sheets via VBA | Excel Programming |