Missing Text with RTF conversion

A

Azim

Hi,

I have a problem when converting reports to RTF. On some
computers the VBA code works fine but on other computers
the output contains missing text.

The line of code is
DoCmd.OutputTo acReport, stDocName, _
acFormatRTF, strFullFileName

where:
acReport is the object type
stDocName is the name of the report
acFormatRTF is the output format
strFullFileName is the name of the output
file with the full path

I need output the text of the report the report to an
editable MS-Word document. At the same time I need to the
output file to retain the formatting of the text in the
report.

Others have this same problem but I have not found any
helpful suggestions. Any suggestions or work arounds for
this problem would be greatly appreciated.

Thanks

Azim
 
R

Rick Brandt

Azim said:
Hi,

I have a problem when converting reports to RTF. On some
computers the VBA code works fine but on other computers
the output contains missing text.

The line of code is
DoCmd.OutputTo acReport, stDocName, _
acFormatRTF, strFullFileName

where:
acReport is the object type
stDocName is the name of the report
acFormatRTF is the output format
strFullFileName is the name of the output
file with the full path

I need output the text of the report the report to an
editable MS-Word document. At the same time I need to the
output file to retain the formatting of the text in the
report.

Others have this same problem but I have not found any
helpful suggestions. Any suggestions or work arounds for
this problem would be greatly appreciated.

Access' RTF export routine is...um flawed. Nothing I know
that you can do about it. If you tweak the design of the
report it might appear to solve the problem for a given set
of records only to appear in a different set. If you make
all controls wider than they need to be and don't use Memo
fields, you can minimize the frequency of the problem, but
I've found nothing that absolutely eliminates it.

In a few cases where my users insisted that they needed
output that was editable in Word, I wrote a custom routine
that wrote out the data along with the appropriate RTF tags
using the file i/o functions in Access. Not something I
would want to make a habit of, but for special cases it
worked well and was much faster than the built-in export
functions.
 
A

Azim Jinha

-----Original Message-----
Access' RTF export routine is...um flawed. Nothing I know
that you can do about it. If you tweak the design of the
report it might appear to solve the problem for a given set
of records only to appear in a different set. If you make
all controls wider than they need to be and don't use Memo
fields, you can minimize the frequency of the problem, but
I've found nothing that absolutely eliminates it.

In a few cases where my users insisted that they needed
output that was editable in Word, I wrote a custom routine
that wrote out the data along with the appropriate RTF tags
using the file i/o functions in Access. Not something I
would want to make a habit of, but for special cases it
worked well and was much faster than the built-in export
functions.

Hi Rick,

Thanks for the reply. Not really what I was hoping for
but if the problem is with the RTF converter. I suppose,
I'll have to write the RTF codes into the report itself
and then export the file as plain text. Unless the plain
text converter is flawed as well --- is it flawed?

The other way would be to write a macro that outputs and
formats each field using word.

Any suggestions?

Sincerely,

Azim

Azim
 
R

Rick Brandt

Azim Jinha said:
Hi Rick,

Thanks for the reply. Not really what I was hoping for
but if the problem is with the RTF converter. I suppose,
I'll have to write the RTF codes into the report itself
and then export the file as plain text. Unless the plain
text converter is flawed as well --- is it flawed?

I don't specifically know of any issues with the Export-To-Text functionality, but it
wouldn't surprise me if there weren't some issues there as well. All you can do is
experiment with it.
The other way would be to write a macro that outputs and
formats each field using word.

Well as I previously stated, I used file i/o to write my data and RTF tags directly
to a file, but your first idea about putting the RTF codes into the report might work
just as well and be simpler to set up. I'll have to try that myself.
 
A

Azim

-----Original Message-----


I don't specifically know of any issues with the Export- To-Text functionality, but it
wouldn't surprise me if there weren't some issues there as well. All you can do is
experiment with it.


Well as I previously stated, I used file i/o to write my data and RTF tags directly
to a file, but your first idea about putting the RTF
codes into the report might work
just as well and be simpler to set up. I'll have to try that myself.
I agree putting the RTF tags into the report seems simpler
to set up. However, if the text-converters are not
reliable then this might not be useful solution. I think
I will have to resort to your solution and write a script
to generate the RTF without relying on the setup in the
report.

The thing that I am worried about is that since the RTF-
converter is not reliable than perhaps the plain text
converter will have the some other problem. I need to be
able to rely on the ouput file being complete. I don't
want to have to worry that every time the output file is
generated that might be incomplete in some way or another.

Again thanks for your response. I'll need sometime to
decide on how best to proceed. If I find a solution, I'll
post it here in a new thread.

Sincerely,

Azim
 

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