Solved

How to print variable length Word document (less than 1 page) in an Access Report

Posted on 2009-06-29
10
351 Views
Last Modified: 2013-11-28
I have a table that has 2 variable-length objects. The objects need to contain text that has paragraph and font formatting instructions (e.g., paragraph breaks, imbedded bolding, colors on phrases). Most of the time the text objects are less than one page long, but are variable in length, and sometimes exceed one page. I currently have the objects as imbedded OLE Objects containing Word document "snippets". The problem with this approach is that you can't size the OLE Object on a report to grow or shrink based upon the number of lines in each record's text. Is there a way to resize a Word OLE Object on a report? Or, is there a way to save the "snippets" in a Memo field and still keep the paragraph/font formatting information? BTW: I'm not needing to edit the information in the "snippets", just store them and display them on a form and in a report.
0
Comment
Question by:MOinReno
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 24742809
I think you are out of luck with this.

As far as I know you can only display one page in an OLE object.To display two pages you would need two controls showing different pages.

Leave the Q open for a while and see if anyone else knows any different, but don't hold your breath!

Are you able to consider printing the Word doc as a completely separate document to be attached to the Access report?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24743472
MOinReno,

I'm with Pete on this.

Questions:
1. What is the problem if the OLE object is more than 1 page?
2. Please clarify what you mean by a "Snippet"
A snippet of the raw text?
If so then you will have to then create a system to open eachword Doc and insert the first x characters into every memo filed. (again, a lot of work and requireing VBA Code)
3. If this is Access 2007, it may be possible to create a Pop-up Report.
4. Is there any way to limit the data in the Word Doc, so that it will fit onto one page?
5. It *always* helps if you exaplain *exactly* what it is you are trying to accomplish.
Sometimes there is a different/better approach.

;-)

JeffCoachman
0
 

Author Comment

by:MOinReno
ID: 24745133
By "snippet" I mean one to several paragraphs of formatted text. The "snippet" content is different for each item listed in a table. Sometimes the text is 3-4 lines, other times it is 6-12, others still it is 50-60 lines - it just depends on how much verbiage is needed to describe the given item listed in each row of the table. I would say that in only 10-15% of the time, the text required to describe the topic takes more than a single page.

My primary issue is working with the variable length of the text - it isn't a workable solution to size the OLE object on the report to work with the largest possible size as that requires a minimum of 3 pages for each item and leaves large blank gaps when there isn't much verbiage for a particular item. Most of the time, the information in the non-OLE table elements + the height of the content in the 2 OLE elements will easily fit on a single page.

The Word "snippets" for each particular item are already pasted into 2 OLE elements in the table, so assembling the data + snippets into the report isn't difficult.

The only reason that I am using Word "snippets" is to allow the user to utilize paragraphing (CRLFs) and font formatting (bolding, underlining, font coloring) of individual words or phrases. I know that Memo fields can handle CRLF's, but it can't handle the font formatting. Many years ago (maybe 1993-95), I ran across a company that sold a library of Access addins that allowed someone to imbed (and even in-line manipulate) rich text inside Memo fields - meaning you could apply underlining, bolding, and font coloring - but a cursory google last week didn't yield any such addin today, hence why I'm trying to work with the imbedded OLE objects. If there is a way to utilize more robust rich text inside Memo fields, I would prefer to do that.

If I have to continue working with imbedded Word OLE "snippets", I know how to handle the multi-page aspect. I just don't know how to shrink or grow the height of an OLE object that doesn't require an entire page.
0
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24745943
The only thing I can think of is to set the Size of the OLE control to the size of one page.
Then set the Size mode property of the control to Zoom.

The Zoom setting will size the contents of the control to always to fit the available size.
It also keeps the aspect ratio of the original object.

JeffCoachman
0
 

Author Comment

by:MOinReno
ID: 24751528
boaq2000, I tried your solution, but it didn't resize the object any smaller than the specified height of the OLE object in the report.

Anyone know of an add-in that allows imbedded font formatting in a Memo field?
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24752496
Then if my Solution did not solve your issues then you should not have accepted it.

By accepting a post you are saying that it is the "Solution" and hence, the question is "Closed".

I have requested that this Q be re-opened.
0
 

Author Comment

by:MOinReno
ID: 24759096
I personally consider the question closed. While the 2 responses didn't provide me with a solution using the imbedded Word document method that I described. Peter57r confirmed my understanding that no solution using this method (other than splitting mult-page "snippets" into separate OLE fields - a task that would be very cumbersome for my usrers) was going to solve one of my problems. Boaq2000 provided a potential workaround for sub one-page "snippets" using the method described - it didn't work. But their responses did finalize my decision to seek a different method to accomplish my task, something that I was able to do by spending more time querying experts-echange's excellent knowlegebase.

I'm not sure what EE wants to do with the question, but EE did provide me with a solution and I am satisfied with how it is working.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 24759421
OK,

Then I suggest that you now accept Pete's post.

;-)

Jeff
0
 

Author Closing Comment

by:MOinReno
ID: 31598223
See final post
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question