A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Filling an email with html



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 15th 06, 12:04 AM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
John
external usenet poster
 
Posts: 135
Default Filling an email with html

Hi

How can I fill a new email with content from an html file?

Thanks

Regards


Ads
  #2  
Old January 16th 06, 08:56 AM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Filling an email with html

Am Sat, 14 Jan 2006 23:04:22 -0000 schrieb John:

You need to read the file´s content first. Sample:

Public Function ReadFile(sPath As String) As String
On Error GoTo AUSGANG
Dim lFileNr As Long
Dim sText As String

lFileNr = FreeFile

Open sPath For Binary As #lFileNr
sText = Space$(LOF(lFileNr))
Get #lFileNr, , sText

AUSGANG:
If lFileNr Then Close #lFileNr
If Err.Number Then Err.Raise &H800A0000 Or Err.Number, _
Err.Source, Err.Description, Err.HelpFile, Err.HelpContext
ReadFile = sText
End Function

Simply add the content then to the mail´s HTMLBody property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook



Hi

How can I fill a new email with content from an html file?

Thanks

Regards

  #3  
Old January 16th 06, 03:39 PM posted to microsoft.public.outlook,microsoft.public.outlook.program_vba
Brian Tillman
external usenet poster
 
Posts: 17,452
Default Filling an email with html

John wrote:

How can I fill a new email with content from an html file?


See if this helps: http://www.slipstick.com/mail1/html.htm
--
Brian Tillman
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sending html in body of outlook xp email Help a Novice Please Outlook - General Queries 3 February 22nd 06 07:50 AM
links in an html email Scott O Outlook - General Queries 1 February 16th 06 03:12 PM
sending email with pictures in other than html text Tim Outlook - General Queries 1 February 9th 06 10:23 AM
HTML email has a grey background Chris Foster Outlook - Installation 0 January 31st 06 07:11 PM
Filling an email with html John Outlook - General Queries 3 January 16th 06 03:39 PM


All times are GMT +1. The time now is 08:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.