RE: send record via HTML EMail
- From: MR C <MRC@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 21 Aug 2009 11:33:02 -0700
Hello Again,
I don't believe it!. Just tried the code again and it works!
Early days yet though.
No doubt I'll be back!
"MR C" wrote:
Hi All,.
This all makes sense to me and is the answer to my problem, but......
It took me ages to realise that i have to include a reference to the Outlook
11.0 Object library. But were the hell is the Outlook Application object!
When I try and run the code I get error 429 can't create object (with the
error highlighted around the line of code that creates the new mail item
MailItem).
The object browser does now show a reference to MailItem but none for the
elusive Outlook Object.
I tried a similar piece of code, i.e. opening up a new Access Db or an
existing Db and this works fine.
Tried you code and keep getting error
"Daniel Pineault" wrote:
Bill then you use HTML tags to do your formatting.
For instance, if you want to bold your text you need to place it in between
bold tags
"<b>" & Me.FirstName & "</b>"
Check out the following site for more info on HTML tags.
http://www.w3schools.com/html/html_formatting.asp
http://www.w3schools.com/html/html_primary.asp
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.
"Bill" wrote:
This is what I have so far. How/where can I put the tags??:
Private Sub Command125_Click()
'Creates a new e-mail item and modifies its properties.
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Set olApp = Outlook.Application
'Create e-mail item
Set objMail = olApp.CreateItem(olMailItem)
With objMail
'Set body format to HTML
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><BODY>Enter the message text here. & Me.[Check-out
Date] </BODY></HTML>"
.Display
End With
End Sub
"Daniel Pineault" wrote:
in your sub/function... you need to reference the various control on your
form to pull/push their values to build your HTML string.
For instance, if your have a textbox named "FirstName" and another named
"LastName" you would code it something like:
strHTML = Me.FirstName & " " & Me.LastName
Your can concatenate in the manner all your controls and build your HTML
message and create the layout you wish using HTML tags.
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.com/index.php
Please rate this post using the vote buttons if it was helpful.
"Bill" wrote:
OK. With help, I was able to get access to send an HTML email. Now I just
need to get the record to be passed. What values or inserts do I put in? I
know this is probably VERY simply
but I lost :-) Thx
- References:
- RE: send record via HTML EMail
- From: MR C
- RE: send record via HTML EMail
- Prev by Date: RE: send record via HTML EMail
- Next by Date: Question Regarding Access Usage and Licensing
- Previous by thread: RE: send record via HTML EMail
- Next by thread: Question Regarding Access Usage and Licensing
- Index(es):
Relevant Pages
|