Text File Export VBA Script Help Please

B

binar

My six column, 300 row report looks great while in Report Mode. But the
customer requires a TEXT file of this report. . I have spent hours tinkering
with the export command found while in Table Mode and the Export Command
while in Report Mode. Neither seems to give me a Text File Report that
mirrors the layout displayed by Access while in Report Mode. The columns in
the Text File are crooked and the heading rows don't line up with the
columns. Is there any way to make Access run a VBA script that will enable
exporting a Text File with high formatting fidelity to the original report
displayed in Access? I need a text file with fixed columns widths that are
padded and display as straight columns with a repeating header row at the top
of each page. Any help will be greatly appreciated. Thanks.
 
P

pietlinden

My six column, 300 row report looks great while in Report Mode. But the
customer requires a TEXT file of this report. . I have spent hours tinkering
with the export command found while in Table Mode and the Export Command
while in Report Mode. Neither seems to give me a Text File Report that
mirrors the layout displayed by Access while in Report Mode. The columns in
the Text File are crooked and the heading rows don't line up with the
columns. Is there any way to make Access run a VBA script that will enable
exporting a Text File with high formatting fidelity to the original report
displayed in Access? I need a text file with fixed columns widths that are
padded and display as straight columns with a repeating header row at the top
of each page. Any help will be greatly appreciated. Thanks.

output it to PDF!
there's code on Stephen's website. www.lebans.com
 
J

John Nurick

Hi binar,

Try this:

1) Format all labels, textboxes and other text in the report in a
monospaced font (e.g. Courier New) at 10 pt.
2) Set all vertical dimensions in the report to exact multiples of
0.125 inch (if you've been working in metric units, switch to inches).
3) Adjust the layout so it previews and prints correctly. With a bit
of luck it will then export to text file correctly.

One further step is to install the Windows Generic/Text Only printer
driver, set this as the printer for the report and make sure the
report is correctly laid out in preview mode.
 

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