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

Sending a clickable email



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 18th 09, 01:35 PM posted to microsoft.public.outlook.program_vba
RoyT
external usenet poster
 
Posts: 2
Default Sending a clickable email

Hi

I am trying to send an email from within ACCESS using automation to send the
email via Outlook.

I have set up the code and I can send the email but I want the image in my
email to be 'clickable' so that when the user clicks on the image they get
taken to a website. It all works OK but the user cannot see the image. I
obviously need to embed the image in the email somehow. Can anyone help
please???

The code I am using is:

Set objOutlook = New Outlook.Application
Set db = CurrentDb()
Set qryDef = db.QueryDefs("qryMail")
qryDef.Parameters(0) = Me.cmbPostCode.Value
Set rstMail = qryDef.OpenRecordset
Do Until rstMail.EOF

' This creates the e-mail
Set objMail = objOutlook.CreateItem(olMailItem)

' This addresses it
objMail.To = rstMail("Email")

'This gives it a subject
objMail.Subject = strSubject

'This gives it the body
objMail.HTMLBody = "htmlheadmeta http-equiv='Content-Type'
content='text/html; charset=windows-1252'" _
& "titleNew Page 1/title/headbodypa
href='http://www.rothco.co.uk'img border='0'
src='file:///C:/Clients/Roy/email%20front12.gif' width='960'
height='720'/a/p" _
& "/body/html"

objmail.Send
'objMail.Display

'And on to the next one...
rstMail.MoveNext
Loop

Set objOutlook = Nothing
Set db = Nothing
Set qryDef = Nothing
Set rstMail = Nothing
Set objMail = Nothing



--
Roy Thompson
Independent Developer
Specialist in Sage Accounting solutions (UK)
 




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
Blocked links still clickable Mark Hall Outlook - General Queries 0 February 22nd 07 02:30 PM
clickable links Debbie Outlook Express 16 October 22nd 06 10:51 PM
Clickable links that arrive in email-OutLook don't work. Help! Letsgomom Outlook - General Queries 4 June 9th 06 11:57 PM
URL's not clickable in email Bob Day Outlook - General Queries 2 May 13th 06 05:06 PM
New PC and my links aren't clickable in Outlook Express 6.0 Snickerdodle Outlook Express 3 January 20th 06 01:07 PM


All times are GMT +1. The time now is 05:05 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.