View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default emailing a whole spreadsheet

Hi Bob

Frontpage ... ugh ... get the garlic and the silver cross

Most people don't like the program

But updating my website is so easy and fast with Frontpage.
It is Superb for me.


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Bob Phillips" wrote in message ...
Frontpage ... ugh ... get the garlic and the silver cross

"Ron de Bruin" wrote in message
...
Hi Bob

I use Frontpage and it create a htm file

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Bob Phillips" wrote in message

...
Oops, sorry Ron, I keep forgetting that you use .htm <G

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ron de Bruin" wrote in message
...
You have .html in the lonk

In the link

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Ron de Bruin" wrote in message
...
Hi Bob

Typical, Ron has deleted it.

You have .html in the lonk

This will work
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Bob Phillips" wrote in message
...
Typical, Ron has deleted it.

Try this code

Sub Mail_HTML_File__Outlook()
Dim OutApp As Object
Dim OutMail As Object
Dim TempFile As String

TempFile = Environ$("temp") & "/" & ActiveWorkbook.Name & _
Format(Now, " dd-mm-yy h-mm-ss") & ".htm"

With ActiveWorkbook.PublishObjects.Add( _
SourceType:=xlSourceRange,

_
Filename:=TempFile, _
Sheet:=ActiveSheet.Name, _

Source:=ActiveSheet.Cells.Address, _
HtmlType:=xlHtmlStatic)
.Publish (True)

End With

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Range("A1").Value
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = "Hi there"
.Attachments.Add TempFile
.send
End With
Set OutMail = Nothing
Set OutApp = Nothing
Kill TempFile ' delete the htm file
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"AmyTaylor"
wrote in
message

...

HI everyone, hope someone can help ? :)
I have a spreadsheet which I would like to automatically email to
selected users, based on the email address entered into a cell

within
the spreadsheet.
The whole spreadsheet should be sent as values only, eg: no

formulae
but keep the formatting.

Is this possible ??
Thanks for any help :)
Amy xx


--
AmyTaylor


-----------------------------------------------------------------------

-
AmyTaylor's Profile:
http://www.excelforum.com/member.php...o&userid=20970
View this thread:
http://www.excelforum.com/showthread...hreadid=513117