Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-06-29
10
Medium Priority
?
355 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 1500 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

730 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