Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default 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
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
how do I keep hyperlinks when emailling a file? Carmen Elena Excel Discussion (Misc queries) 1 August 17th 08 06:46 PM
IRR Trouble jeff Excel Worksheet Functions 1 August 20th 07 09:42 PM
Packaging Word & Excel files for emailling to preserve links BOBODD Excel Discussion (Misc queries) 1 November 7th 06 08:56 PM
Trouble with IF EG Excel Worksheet Functions 9 October 3rd 06 07:15 PM
Emailling sheets via VBA PhilM Excel Programming 2 September 20th 06 08:56 AM


All times are GMT +1. The time now is 02:16 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"