I have VBA code to save an active worksheet as HTML, but I am lost when I try to email the HTML page from Excel.
I need to automatically send the HTML email to a customer using a confirmation number on the workseheet as well as the email addressee.
When I try to email an active worksheet to a customer too much detail is sent & some customers will not be able to read the excel page.
The following code represents only the saving of the HTML page:
****************
Private Sub save_web_page_Click()
Dim Thisfile As String
On Error GoTo quit
Sheets("confirmation_letter").Activate
Thisfile = Worksheets("confirmation_letter").Range("Reservation_Name").Value
ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceRange, _
Filename:="C:\Documents and Settings\Greg\My Documents\Reservations\Reservation_web_pages\" & Thisfile, _
Sheet:="confirmation_letter", Source:="Print_Area", HtmlType:=xlHtmlStatic).Publish
GoTo Endall
quit:
MsgBox "...WARNING... " & Thisfile & " HTML web page File not Saved"
Endall:
End Sub
***************************
Any help will be greatly appreciated.
Greg
Bookmarks