Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: Outputto question

Outputto question
"Presto" <presto__NOSPAM[ at ]prestoweb.net> 11/12/2008 8:08:33 PM
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:me[ at ]myserver.com">Email Support</a>
</body></html>



RE: Outputto question
Clifford Bass 11/13/2008 11:25:00 PM
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

"Presto" wrote:

[Quoted Text]
> 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:me[ at ]myserver.com">Email Support</a>
> </body></html>
Re: Outputto question
"Presto" <presto__NOSPAM[ at ]prestoweb.net> 11/15/2008 7:46:08 PM
Actually, that sounds like a great idea! Very do-able!
Good ol' DOS.. I almost forgot about our good ol friend.

Thanks.

"Clifford Bass" <CliffordBass[ at ]discussions.microsoft.com> wrote in message
news:6AE32F02-BD9C-41D0-A66A-D8E10AE4C1B7[ at ]microsoft.com...
[Quoted Text]
> 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
>
> "Presto" wrote:
>
>> 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:me[ at ]myserver.com">Email Support</a>
>> </body></html>


Re: Outputto question
"Presto" <presto__NOSPAM[ at ]prestoweb.net> 11/15/2008 8:20:14 PM
I just gave it a try and it works perfectly! Thanks again.


"Clifford Bass" <CliffordBass[ at ]discussions.microsoft.com> wrote in message
news:6AE32F02-BD9C-41D0-A66A-D8E10AE4C1B7[ at ]microsoft.com...
[Quoted Text]
> 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
>
> "Presto" wrote:
>
>> 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:me[ at ]myserver.com">Email Support</a>
>> </body></html>


Re: Outputto question
Clifford Bass 11/17/2008 4:35:02 PM
Hi Presto,

Good to hear that. You are welcome.

Clifford Bass

"Presto" wrote:

[Quoted Text]
> I just gave it a try and it works perfectly! Thanks again.

Home | Search | Terms | Imprint
Newsgroups Reader