html output options dialog box

I

I7

In Access 2007, when exporting a table in html format, I get a dialog box
labelled "html output options". In this application, I will always simply
click "OK" on the dialog box. Therefore, I would like to find a way to stop
seeing this dialog box. It is annoying to have to click OK every time when
there is no other choice. Is there a way to programmatically click OK?
SetWarnings False doesn't work. Or, I could export the table in csv format,
but then I lose any carriage returns and line feeds in the memo field of the
table. Also very annoying. Is there a way to export as a .csv file and also
keep the formatting so that carriage returns and line feeds and such are not
lost?
 
A

Albert D. Kallal

In Access 2007, when exporting a table in html format, I get a dialog box
labelled "html output options". In this application, I will always simply
click "OK" on the dialog box. Therefore, I would like to find a way to
stop
seeing this dialog box. It is annoying to have to click OK every time
when
there is no other choice.

If you want just basic html, you can go:

DoCmd.TransferText acExportHTML, "export-faxbook",
"faxbook", "c:\faxbook.html", True

(above goes on one line..)

However, exporting as you are doing with the html dialog does produce a
"nicer output" Do try the above since if the html looks good enough for
you, not get any dialog prompts.
Is there a way to programmatically click OK?

Well...yes sort of!! but it is kluge....

That dialog box can be dismissed if you hit the enter key, so, if you throw
in a "enter key" into the input buffer BEFORE you laucnh the export, the
dialog box can be dismissed. So, you can go:

SendKeys "{Enter}"
DoCmd.RunSavedImportExport "export-faxbook"

However, I am against suggesting in public to use sendkeys, and it is
damaging to my reputation as a developer to recommend this approach. So, try
the transfer text example. And as a LAST resort....use the sendkeys idea....
 

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