VBA code needed for .HTMLbody with Access 2010

knarlyd@hotmail.com

Registered User.
Local time
Yesterday, 22:54
Joined
Sep 6, 2013
Messages
43
I have some code to send an email from Access however in the .HTMLbody, I would like to have part of the .HTMLbody set to a variable because at the beginning of every month, there is a URL within the body that changes.
Can anyone help me on setting a variable for the URL as well as how to code it so it only prompts for the URL change at the beginning of each month? The person would only get a popup box (or something similar) to provide the new URL.
:banghead:

Code:
Set ol = CreateObject("Outlook.Application")
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
   .to = myVarEmail
   .Subject = "Case Survey - Please Provide Feedback"
    .htmlbody = "Please click on the link below:<br><br>" & _
                         "<center><A  HREF=""https://www.mywebsite.com/r/ABCDEF"">Survey</A></center><br>"
                       
        .Display
 

Users who are viewing this thread

Back
Top Bottom