Discussion Locked

Exporting Acess 97 Reports to Word

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm hoping that spanning my question across multiple republics will help move this along. Please visit:
https://www.techrepublic.com/forumqa/thread_detail.jhtml?thread_id=41227

It may be worth 1000 points to you.
640k

11 replies

by donq

Use the OutputTo action to send a (datasheet, query, form, report, module, or data access page) to MS-DOS text (.txt), or rich-text (.rtf)

In Help enter "word export" and click OutputTo Action

DoCmd.OutputTo "bla, bla, bla"

by sixfourtykilo

This was already posted as an answer. It creates the same jumbled mess that pressing the officelink button on the toolbar does.

640k

by donq

You could also select from the menu:

Tools | Office Links | Publish it with MS Word

either way your task is simple.

by bob sellman

I assume you want to export report(s) to Word from Access 97 (the link wouldn't work for me).

The news is bad: Access 97 does not provide that ability. The closest you can get to a Word format is to output as an RTF file. The problem is that the RTF format includes no graphics at all (not even lines!). If you want to include a graphic, then you really are out of luck. I've wanted to do this and had to give up.

I know that it's not really what you want, but if you can format your output in a way that can go to an Excel spreadsheet, you might get something useful, if a pain to set up.

The RTF format is fine if you can work with reports with no graphics (lines, boxes, graphs, etc.) at all. Then it will work fine, since the RTF format does include font information and the like.

Since I couldn't see your original question, I'm not sure what you are trying to do, but here's a thought: If you want to produce reports that users can't change and you want to include graphics/graphs, why don't you get Adobe Acrobat and create PDF files? In the long run it might be a better solution.

by sixfourtykilo

Thank you, that is a thought, however the content that I need to export is not rich in anything but text. There is a little formatting which rtf and word seem to handle with tab control, but towards the end of the document, it blows up. The original writing of the coding that would allow the information to be posted into a word document referenced a template and bookmarks within the template to complete the formatting and the template is no where to be found! Imagine that! Check the Software section of Q&A, titled under the same name if you're having problems with the above link.

Thank you for your response!
640k

by bill

You said, in one of your comments:

>>The original writing of the coding that would allow the information to be posted into a word document referenced a template and bookmarks within the template to complete the formatting and the template is no where to be found! Imagine that! <<

Does this mean you've got an existing program, that used to do this, but the template is now missing?

We use Word Templates/bookmarks extensively to build and publish insurance policies. If the original template is now gone, it's going to take a bit of detecive work to determine what the document itself was handling. My guess is, that various sections of the document were set up to recieve various components of the 'feed' from Access, and take care of what you refer to as 'blowing up'.

Too add, or second, anothers idea... we're moving all of our exported reports to PDF's, they're smaller, non-editable and universal in their usage.

If you have a bit more specific info on the Template or the process, I'd be happy to look at it.

by sixfourtykilo

From the code I can determine the following:
The template contained bookmarks.
Each bookmark was referenced in the code to determine where the next record will be pasted (obviously).

The bookmarks, etc were all fairly obvious, however in the beginning I didn't agree with the idea of having to keep a template on hand and what could possibly be inaccessible to remote users. Once I had found out that the original idea of integrating office with itself was only a dream (exporting to Word), I decided to pick the code back up and try to work with it. When I attempted to create a new template with bookmarks, etc., they could not be found. It was becoming apparant I either didn't know what I was doing or just didn't fully understand the process (hopefully the later). Thats when I decided to post discussion threads for ideas or solutions. The only thing I DON'T like about the PDF format is it is non-editable. The eventual output of the document must have the ability to be edited in any way, and to put a larger log on the fire, Adobe is not company standard and standards won't be bent for this situation. Confused?

Thanks for the response!
640k

by bill

No problem.. as a vet of many years, of the MS-Office integration wars, I certainly understand your feeling : >>Once I had found out that the original idea of integrating office with itself was only a dream (exporting to Word)<<

It's not exactly easy, or simple, but it is possible, and can, in most cases be done so that the users don't 'see' the framework.

I'd suspect that the 'template' approach was used for much the same reason we used it. It allowed us to process data, in our 'data engine' and then create report documents in our 'document engine'... Currently I'm researching placing the data, on preformated templates, directly from the 'data engine' (in your case Access, in mine FoxPro) so far it appears to be working as well asexpected.

As for the templates being accessable to remote users, we store the templates *in* a database, so if the user has access to the data, they have access to the templates.

Let me know what you've tried, and/or if you're at all interested in using a VB approach to 'document building', or does this *have* to be done in Access?

This discussion is closed to new replies.