Outputto question

P

Presto

I have the following in my code. It works as expected. It exports the named
table to an html file.
DoCmd.OutputTo acOutputTable, "tbl_MeetingDates", acFormatHTML,
"F:\html\MeetingDates.html"

What I would like to do is set it up to delete the old file, then export as
HTML and add my own HTML as its created.
How can I have it export basically a bunch of text - my html code - then the
table data - then the rest of the html.
I have several pages that I need to export this way and I'm placing them in
one module together since they are only used once a month.

heres a simple example of what I want to output:

<html><head><title>Our Meeting Dates</title></head>
<body><P><H2>Our Meeting Dates</H2>
<HR>
<P>

*** my table data goes here as text... ***
field1 field2 field3

<P><a href="mailto:[email protected]">Email Support</a>
</body></html>
 
C

Clifford Bass

Hi Presto,

How about creating a header file and a footer file that contain the
parts you want to add to the file. Then create a batch file that you can
call after the table is exported. The batch file would use the copy command
to combine the three files. The batch file might contain something like this:

copy "F:\html\Header.html"+"F:\html\MeetingDates.html"+"F:\html\Footer.html"
""F:\html\Meeting Dates with Header and Footer.html"

This is untested. And I am sure there are other ways to do it.

Clifford Bass
 
P

Presto

Actually, that sounds like a great idea! Very do-able!
Good ol' DOS.. I almost forgot about our good ol friend.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top