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

Variables passed into HTML from VBA for a boilerplate template



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old January 29th 08, 04:30 PM posted to microsoft.public.outlook.program_vba
Nathan
external usenet poster
 
Posts: 30
Default Variables passed into HTML from VBA for a boilerplate template

Sue, Thanks for you quick response! Using this method how would I get VBA
to do a find through either the .oft file or through an HTM/HTML file to find
the field and replace with the inputbox variable? Also can I define a full
file and designate that as a variable that I can then set the .htmlbody
method to?


Nathan Bell

"Sue Mosher [MVP-Outlook]" wrote:

I've done this by using placeholders in the HTML where the data from the InputBox result should go. For example, put %Field1% where you want one bit of data to appear, then use something like:

htmlText = Replace(htmlText, "%Field1%", "New Text")
myMessage.HTMLBody = htmlText

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Nathan" wrote in message ...
All,

I have a complex HTML e-mail message that I want to be able to customize
using variable in VBA. I don't want to have to go through the entire HTML
maessage and include in the the .htmlbody when creating a new message. I
would perfer to somehow pass variables that are set via an input box and then
pass them into the message in a template? Some variables are just text in
the message with HTML formatting and some variables are text+part of a
hyplerlink. Does anyone know wuick way to achieve this, I am just spinning
my wheels...


 




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
Global Variables/Session Variables dch3 Outlook and VBA 2 May 31st 07 02:11 PM
Automated answer-template with "dyn." html Jens Sommer Outlook and VBA 3 April 4th 07 07:12 AM
Mail Form variables not passed Buyersusa Outlook Express 1 December 22nd 06 04:15 AM
build a string from HTML to modify template Bob Outlook and VBA 2 December 15th 06 08:34 PM
Embedding html and text files in an email template. Maria Outlook - General Queries 0 October 31st 06 11:32 PM


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