[AccessD] HTML Email from Access - Progress

Stuart McLachlan stuart at lexacorp.com.pg
Tue Aug 19 17:37:40 CDT 2003


On 19 Aug 2003 at 9:37, Steve Capistrant wrote:

> MessageAs long as the SendObject topic is open:  does anybody really know
> how to use the TemplateFile parameter?  This would seem to be the perfect
> mail merge tool, but I can't find documentation anywhere, and my attempts
> silently fail (a plain vanilla email is produced, and that's all).
> 
Buried many layers deep in the A2K Help files is a secret location, 
know only to a select few. Lock the doors, close the curtains and I 
will let you in on the secret :-)

(Hint: OutputTo Action - Remarks - Export a Report to Static HTML 
format)

"About HTML template files
You can use one or more HTML template files to enhance the 
appearance, consistency, and navigation of your static HTML and 
server-generated HTML files. For example, you might want to include a 
company logo in the header section, a company-approved background 
image in the body section, and your own navigation buttons in the 
footer section of a static HTML report.

An HTML template is a text file that includes HTML tags and tokens 
that are unique to Microsoft Access. These tokens indicate where to 
insert output and other information in the static HTML or server-
generated HTML files. See an example of an HTML template file.

When you output a table, query, form, or report, and you specify an 
HTML template file in the associated Output Options dialog box, 
Microsoft Access merges the HTML template file with the .html, .asp, 
and .htx output files by replacing the tokens with the following.

HTML template token Replacement 
       
<!--AccessTemplate_Title--> The name of the table, query, form, or 
report placed in the title bar of the Web browser 
<!--AcessTemplate_Body--> The output of the table, query, form, or 
report 
<!--AccessTemplate_FirstPage--> An HTML anchor tag that links to the 
first page of a report 
<!--AccessTemplate_PreviousPage--> An HTML anchor tag that links to 
the page previous to the current report page 
<!--AccessTemplate_NextPage--> An HTML anchor tag that links to the 
next page after the current report page 
<!--AccessTemplate_LastPage--> An HTML anchor tag that links to the 
last page of a report 
<!--AccessTemplate_PageNumber--> The current page number "


The "see an example" in the above text jumps to a second page 
containing this:

"HTML template file example
<HTML>

<!--The following token places the object name in the title bar of 
the Web browser.-->

<TITLE><!--AccessTemplate_Title--></TITLE>

<!--The following HTML tag creates a different background color than 
the Web browser default.-->

<BODY BACKGROUND = "gray.jpg">

<!--The following token places all object output inside the <BODY> 
tag.-->

<!--AccessTemplate_Body-->

</BODY>

<BR><BR>

<!--The following four tokens create four navigation text buttons 
that jump to the first, previous, next, and last pages of a report.--
>

<A HREF = "<!--AccessTemplate_FirstPage-->">First</A>

<A HREF = "<!--AccessTemplate_PreviousPage-->">Previous</A>

<A HREF = "<!--AccessTemplate_NextPage-->">Next</A>

<A HREF = "<!--AccessTemplate_LastPage-->">Last</A>

<!--The following token inserts the text "Page n" , where n is the 
current report page number.-->

<P ALIGN = CENTER>Page <!--AccessTemplate_PageNumber-->.</P>

<!--The following HTML tag adds a company logo to the bottom of the 
Web page.-->

<IMG SRC = "company_logo.jpg">


 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.





More information about the AccessD mailing list