By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,675 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

template file parameter?

P: n/a
MLH
Searching at http://support.microsoft.com/search/?adv=0 for Access 97
and "templatefile" returns the following:
There are no documents that match your search for "templatefile"

Has anyone ever seen any specification for HTML templatefile
microsoft says can be used in conjunction with the SendObject
and OutPutTo methods - anywhere on the web? Publications or
manuals? A friend or a cousin that may know something or someone?
Nov 20 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
MLH wrote:
Searching at http://support.microsoft.com/search/?adv=0 for Access 97
and "templatefile" returns the following:
There are no documents that match your search for "templatefile"

Has anyone ever seen any specification for HTML templatefile
microsoft says can be used in conjunction with the SendObject
and OutPutTo methods - anywhere on the web? Publications or
manuals? A friend or a cousin that may know something or someone?
I once did an HTML template in A97 by replacing valid text/values with
names inside of double angle brackets ala Word:

<<MyParameter>>

e.g., ... bgColor=#<<BackGroundColor>>...

You can use VBA to read in the text of your template, save it as a
string, then use a custom replace function call to substitute in the
values for each of your parameters. Maybe the OutputTo method can get
you an initial HTML file to get you to the starting line. I've never
used SendOutput because it seemed better to use more general methods,
but it may be worthwhile to examine which situations favor its use.

James A. Fortune
CD********@FortuneJames.com

Nov 20 '06 #2

P: n/a
CD********@FortuneJames.com wrote:
I once did an HTML template in A97 by replacing valid text/values with
names inside of double angle brackets ala Word:

<<MyParameter>>

e.g., ... bgColor=#<<BackGroundColor>>...

You can use VBA to read in the text of your template, save it as a
string, then use a custom replace function call to substitute in the
values for each of your parameters. Maybe the OutputTo method can get
you an initial HTML file to get you to the starting line. I've never
used SendOutput because it seemed better to use more general methods,
but it may be worthwhile to examine which situations favor its use.

James A. Fortune
CD********@FortuneJames.com
An extension of this idea can produce variable-length HTML tables. If
you have an existing HTML table you can find the part that repeats
(including tags) and use it to generate a variable-length table. Use a
replace marker to replace the repeating part of the HTML table. Then
use a data loop to concatenate as many repeating parts as you need into
a replacement string.

James A. Fortune
CD********@FortuneJames.com

Nov 20 '06 #3

P: n/a
MLH
Both great ideas. Can't wait to try the first one.
Am hoping its the one!
Nov 21 '06 #4

P: n/a
MLH
So something like the HTML snippet below (automatically
produced by the database app - which would explain the
relatively poor HTML design) contain these 7 replaceable
parameters wrapped in <<>might do the trick???

XYZCompany
FaxNum
strOwnerName
OwnerAddr
CodeNum
OwnrFoneNum
OwnrFaxNum

<!-- saved from url=(0022)http://internet.e-mail -->
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type"
CONTENT="text/html;charset=windows-1252">
<TITLE>rptMotorVehicleInfoFAXform</TITLE>
</HEAD>
<BODY>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=32 >
<TD WIDTH=2 ><BR></TD><TD WIDTH=619 ALIGN=CENTER ><B><FONT SIZE=5
FACE="Times New Roman" COLOR=#0000ff><<XYZCompany>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=125 ><BR></TD><TD WIDTH=373 ALIGN=CENTER ><B><U><FONT
SIZE=3 FACE="Arial" COLOR=#000000>MOTOR VEHICLE INFORMATION FAX
</FONT></B></U></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=89 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>DATE:</FONT></TD>
<TD WIDTH=249 ALIGN=CENTER ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff>Tuesday, November 21, 2006</FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=89 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>TIME:</FONT></TD>
<TD WIDTH=249 ALIGN=CENTER ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff>10:00:41 AM</FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=83 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>TO:</FONT></TD>
<TD WIDTH=540 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>DMV
REGISTRATION </FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=21 >
<TD WIDTH=83 ><BR></TD><TD WIDTH=286 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>SECTION</FONT></TD>
<TD WIDTH=74 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>VIA
FAX:</FONT></TD>
<TD WIDTH=180 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<FaxNum>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=94 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>FROM</FONT></TD>
<TD WIDTH=529 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<XYZCompany>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=17 >
<TD WIDTH=623 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>:</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=94 ><BR></TD><TD WIDTH=529 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<strOwnerName>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=94 ><BR></TD><TD WIDTH=529 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<OwnerAddr>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=183 ALIGN=RIGHT ><FONT SIZE=3
FACE="Arial" COLOR=#000000>USER CODE </FONT></TD>
<TD WIDTH=10 ><BR></TD><TD WIDTH=386 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<CodeNum>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=183 ALIGN=RIGHT ><FONT SIZE=3
FACE="Arial" COLOR=#000000>TELEPHONE </FONT></TD>
<TD WIDTH=10 ><BR></TD><TD WIDTH=386 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<OwnrFoneNum>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=183 ALIGN=RIGHT ><FONT SIZE=3
FACE="Arial" COLOR=#000000>FAX NUMBER:</FONT></TD>
<TD WIDTH=10 ><BR></TD><TD WIDTH=386 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff><<OwnrFaxNum>></FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=623 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>SECTION I:
INFORMATION SUPPLIED BY USER CODE CUSTOMER</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=126 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>VEHICLE VIN #:</FONT></TD>
<TD WIDTH=453 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff>1FAFP34P61W166736</FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=186 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>ODOMETER </FONT></TD>
<TD WIDTH=398 ><B><FONT SIZE=3 FACE="Arial"
COLOR=#0000ff>121,391</FONT></B></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=17 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>READING:</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=623 ><FONT SIZE=3 FACE="Arial" COLOR=#000000>SECTION II:
INFORMATION REQUESTED FROM DMV</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>1. OWNER NAME AND ADDRESS</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>2. LESSOR NAME AND ADDRESS</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>3. LIENHOLDER(S) NAME AND ADDRESS</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=19 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><FONT SIZE=3 FACE="Arial"
COLOR=#000000>4. VEHICLE VALUE FROM COMMISSIONER (required by
Clerk of Court)</FONT></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=14 >
<TD WIDTH=44 ><BR></TD><TD WIDTH=579 ><U><FONT SIZE=1 FACE="Arial"
COLOR=#000000(Even if vehicle is NOT found in STARS - I still want
and the Clerk of Court REQUIRES the vehicle
evaluation)</FONT></U></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=25 >
<TD WIDTH=2 ><BR></TD><TD WIDTH=174 ><B><I><FONT SIZE=3 FACE="Arial"
COLOR=#000000>SPECIAL NOTE FOR </FONT></B></I></TD>
<TD WIDTH=433 ><B><I><FONT SIZE=1 FACE="Arial" COLOR=#000000>Should
vehicle turn out to be a 'John Doe' (one on which the GA DMV has NO
</FONT></B></I></TD>
<TD WIDTH=447 ><B><I><FONT SIZE=1 FACE="Arial" COLOR=#000000>data on
file) worth less than $800 - then we respectfully request a
</FONT></B></I></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=17 >
<TD WIDTH=2 ><BR></TD><TD WIDTH=174 ><B><I><FONT SIZE=3 FACE="Arial"
COLOR=#000000>CHARLES DAVIS:</FONT></B></I></TD>
<TD WIDTH=447 ><B><I><FONT SIZE=1 FACE="Arial" COLOR=#000000>data on
file) worth less than $800 - then we respectfully request a
</FONT></B></I></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=12 >
<TD WIDTH=176 ><BR></TD><TD WIDTH=447 ><B><I><FONT SIZE=1 FACE="Arial"
COLOR=#000000>'Correspondence Letter' from the Mail &amp; Distribution
Center (Mary Biggs) </FONT></B></I></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=12 >
<TD WIDTH=176 ><BR></TD><TD WIDTH=447 ><B><I><FONT SIZE=1 FACE="Arial"
COLOR=#000000>stating that GA DMV has no owner information on file for
VIN </FONT></B></I></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=12 >
<TD WIDTH=176 ><BR></TD><TD WIDTH=447 ><B><I><FONT SIZE=1 FACE="Arial"
COLOR=#000000>#1FAFP34P61W166736 (per Karen).</FONT></B></I></TD>
</TR>
</TABLE>

</BODY>
</HTML>

How is it that I tell the Access application's SendObject method to be
on the "lookout" for those variables and which values are slated for
substitution in place of the parms?
Nov 21 '06 #5

P: n/a
MLH wrote:
So something like the HTML snippet below (automatically
produced by the database app - which would explain the
relatively poor HTML design) contain these 7 replaceable
parameters wrapped in <<>might do the trick???

...
I think you've got the idea.
How is it that I tell the Access application's SendObject method to be
on the "lookout" for those variables and which values are slated for
substitution in place of the parms?
Replace the parameters one after the other in code. E.g.,

strHTMLFileText = Replace(strHTMLFileText, "<<XYZCompany>>",
Nz(MyRS("CompanyName"), ""))
strHTMLFileText = Replace(strHTMLFileText, "<<FaxNum>>",
Nz(MyRS("FaxNumber"), ""))
....

Instead of hard coding the replacements you can use a table:

tblReplacements

RID Token FieldName
1 <<XYZCompany>CompanyName
2 <<FaxNum>FaxNumber
....

and put the Replace line in a loop. Once you have the final HTML
string you can write it to a file or do something creative with it. As
I said, I don't use the SendObject method so I don't know if it can use
a string in memory directly.

James A. Fortune
CD********@FortuneJames.com

Nov 21 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.