Export Access to Word

J

Jason

We have to export a query in Access 97 to Word.

However, the query contains a number of memo fields
(Descirption ... ). We are not able to find out how to
make the export looks properly in Word (Since there is no
word wrap, only a number of columns are shown).

Then we have created reports with those queries. With the
long field (Like Memo fields), set the property to "Allow
Grow" and "Allow Shrink". It looks fine when we preview
the report in Access.

However, when we export the report to RTF and open the RTF
file in Word 97, we find that the location of some items
are misplaced. End user has to use Word to do formatting
and further manipulation.

We would like to know is there any better to do so ?
 
J

Jason

Dear Alex,

Thank you for your reply. It is also the way I head off.

However, I encounter one problem. In the query, we have
to enter 2 parameters [Start Date] and [Finish Date].
There is no problem in generating the Word Document.
However, if I want to reuse the Word Document, I am not
able to find out how to prompt for the parameter so that I
can refresh the report.

I have tried [F9] and the [Update Field] button but still
cannot get it solved. Your help is appreciated.

Thanks
 
A

Alex Ivanov

There is no easy way to refresh the Word report.
The best thing is to generate a new one
passing new parameters to the underlying query.

You can either build your query at run time like
strQry="select * from table1 where field1='" & textparam _
& "' and field2=" & numericParam
set rs=currentdb.openquery(strQry)
....

or using QueryDef object
assign parameters to it before opening the QueryDef
Dim rs As DAO.Recordset
With CurrentDb.QueryDefs("querytest")
.Parameters(0) = 1
.Parameters(1) = "something"
Set rs = .OpenRecordset
End With

HTH

--
Please reply to NG only. This email is not monitored.
Alex.


Jason said:
Dear Alex,

Thank you for your reply. It is also the way I head off.

However, I encounter one problem. In the query, we have
to enter 2 parameters [Start Date] and [Finish Date].
There is no problem in generating the Word Document.
However, if I want to reuse the Word Document, I am not
able to find out how to prompt for the parameter so that I
can refresh the report.

I have tried [F9] and the [Update Field] button but still
cannot get it solved. Your help is appreciated.

Thanks
-----Original Message-----
In your case it would be better if you create your reports directly in Word,
then you would have better control on formatting.
See some examples at http://www.aleksoft.net/samples/TestReport.zip
or http://www.aleksoft.net/samples/Access_Word.zip

HTH
--
Please reply to NG only. This email is not monitored.
Alex.





.
 

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