RE: send record via HTML EMail

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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

.



Relevant Pages

  • RE: send record via HTML EMail
    ... "Daniel Pineault" wrote: ... Check out the following site for more info on HTML tags. ... Dim objMail As Outlook.MailItem ...
    (microsoft.public.access.modulesdaovba)
  • RE: send record via HTML EMail
    ... It took me ages to realise that i have to include a reference to the Outlook ... "Daniel Pineault" wrote: ... Check out the following site for more info on HTML tags. ... Dim objMail As Outlook.MailItem ...
    (microsoft.public.access.modulesdaovba)
  • [ANN] kramdown 0.8.0 released
    ... kramdown is a *free* ... HTML tags into native kramdown elements via the new `html_to_native` ... generic HTML tags (e.g. the LaTeX converter). ...
    (comp.lang.ruby)
  • page-cgi.txt Can anyone tell me what this is or how its used?
    ... sub editPage ... print "Those are HTML tags. ... print "sprinkle in HTML tags. ...
    (comp.theory)
  • Re: question on: HTA and format to include external script file
    ... - not sure what you mean by xml-ize 'ing HTML tags? ... As I understand it, XHTML adds ... "Frankly I don't see why people find a need to XML-ize ...
    (microsoft.public.scripting.vbscript)