LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Problem with E-mailing from Excel

I'm having a problem E-Mailing a spreadsheet via Code from Excel. The code
itself is fine, but the file is added as an attachment as a "dat" extension.
This has only just started having worked for a long number of months.

I have used VBA Code Cleaner but that has made no difference

I have checked to ensure that the References have been set to "Microsoft
Ooulook 10 library"

My PC is clean of any viruses (AFAIK)

I have using Excel / Outlook XP

Anyone ever have similar problem? Code to E-mail is below (thanks to Ron De
Bruin), but don't think thats the issue, because why would it suddenly cause
a problem?




Sub Mail_Reports()
Dim wb As Workbook
Dim strdate As String
Dim MyArr As Variant
strdate = Format(Now, "dd-mm-yy h-mm")
Application.ScreenUpdating = False
Sheets("E-Figures").Visible = True
Sheets("E-Import").Visible = True
Sheets(Array("E-Figures", "E-Import")).Copy
Set wb = ActiveWorkbook
With wb
.SaveAs ThisWorkbook.Name _
& " Sent on" & " " & strdate & ""
MyArr = Sheets("E-Figures").Range("AJ1:AJ3")
.SendMail MyArr, Sheets("E-Figures").Range("AJ4").Value
.ChangeFileAccess xlReadOnly
Kill .FullName
.Close False
End With
Application.ScreenUpdating = True

Sheets("E-Figures").Select
ActiveWindow.SelectedSheets.Visible = False

Sheets("E-Import").Select
ActiveWindow.SelectedSheets.Visible = False

Sheets("Home").Select
Range("A1").Select
End Sub


 
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
I need to import my Excel Mailing list into mailing label format. Gord Dibben Excel Discussion (Misc queries) 0 November 5th 09 10:16 PM
I need to import my Excel Mailing list into mailing label format. Lyn Excel Discussion (Misc queries) 0 November 5th 09 08:11 PM
E-mailing from Excel 2003 problem PaulC Excel Programming 0 January 16th 06 06:10 PM
Problem mailing as an attachment CJz Setting up and Configuration of Excel 2 April 14th 05 08:46 PM
how do i convert MS Word mailing labels into an Excel mailing lis. unrhyll Excel Discussion (Misc queries) 1 February 4th 05 12:19 AM


All times are GMT +1. The time now is 07:29 PM.

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

About Us

"It's about Microsoft Excel"