html output options dialog box

  • Thread starter Thread starter I7
  • Start date Start date
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?
 
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....
 
Back
Top