Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Document in report

Status
Not open for further replies.

GShen

MIS
Sep 26, 2002
561
US
Hi,
I am trying to print a word document from a report. I created an Unbound Object Frame and the following are the problems.
1) I only get 1 page of the document. I have the unbound
frame in the detail section.
2) I have 6 folders which I have which contain documents.
I have different document names in each folder. If I
make a copy of the report, it still points to the
original document in another folder, regardless of the
name of the source object which I have on the unbound
frame. I was just changing the source doc name. It
looks like I will have to create the report for each
folder. Obviously the name is hidden somewhere where I
can't view or change it.

The documents will be created by a user, I have no idea what he is going to call each document. I can't force him. So, I figure in VB, there must be some way of getting the name from the folder.
I was then going to set the source name to the name I find prior to opening the report. However, considering I can't copy a report, I am getting apprehensive.

Any help on any of the above is appreciated. Right now it looks like ACCESS is not doing what it says it does.

Am I doing something wrong ? I have wasted enough time on this. Is any of this feasible ?

THanks


Remember when... everything worked and there was a reason for it?
 
I do not believe you can change the source document of an OLE object in a report. Is it suitable for you to use mailmerge, or to dynamically build a word document? It may be possible to print a form with an OLE object, but I have not tried, and I am not recommending this approach.
 
Remou,
I actually was able to change the source doc (in name only) using VB code but it did not change anything. It still points to the original document. When I view it in design view, I can see the name is the new name but it doesn't change the document it is pulling in and I still have the 1 page problem. I was trying to build a word document but the user needs to insert pictures, etc. and I figured it would be easier to just pull in his document and print it when he was done. What does mailmerge do for me ? I am not familiar with it.

Remember when... everything worked and there was a reason for it?
 
Mail merge allows you to integrate data from the database with a word document, here is a recent thread:
I have also found that it is not so difficult to build reports using HTML and Word. You can drop various bits and pieces into bookmarks in a template or build from scratch. Word will happily open HTML fully formatted if you include internal CSS.
 
Remou,
I followed your link for editing a document. However, that is not my problem. I have a report with 8 subreports. All of the subreports are driven from tables, stored procedures,etc.. I am actually printing an order book. Sometimes we need to insert a sheet (built in word) as a reminder for all the customers. So I need to add a subreport with this word document. There seems to be no easy answer or ANY answer for this. As I have also stated, if there is more than 1 page, I cannot get it to print page 2-x, but if I cannot change the subreport to the document I want to print (eg. the source doc) and have it pull the unbound object (eg. the word document), dynamically, then I am out of luck.

I have just about exhausted all possibilities. I was actually pretty close in getting the data into a table but the hook is I need pictures in the document. That would be my last option. The user goes to the internet and copies pictures and pastes them to the word document. The heading on the report I can generate, the body I can make a text field as well as the footer. It is the pictures which they need to cut and paste which is causing me the headache.

Should I repost with the latter question. (Eg. inserting pictures in ACCESS via a cut and paste?

Thanks for your help.



Remember when... everything worked and there was a reason for it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top