Solved

"4120: Bad parameter" error when printing Word-based report from VB app

Posted on 2007-04-10
8
1,852 Views
Last Modified: 2008-01-23
I have an application that uses a locked Access 2000 database and is built in VB.  Reports for the data are generated in MS Word.  I have Office 2007 installed on WinXP SP2.  When I try to print or preview a report from the application, I get "4120: Bad parameter".  The application has multiple Word template styles available; I've tried all of them and get the same result.  The only way I can print reports from this app is by using the "dot matrix" style, which does not use MS Word and can only be printed (no preview).  

Outside the 3rd party app, Word opens normally, and new or saved documents print normally.  The only time the error occurs is when trying to print or preview reports from this 3rd party application.  

I'm happy to provide more specific information as soon as I know what is needed.  Thanks!
0
Comment
Question by:enkotec
  • 3
  • 2
8 Comments
 
LVL 13

Expert Comment

by:adraughn
ID: 18882764
My suggestion would be to temporarily remove error handling in the VB app for the mod that is used to print the report, then run again and see which line breaks. then post the line. (along with the rest of the code) you said it was written in VB. VBA? VB6? VB.net?

adria
0
 
LVL 39

Accepted Solution

by:
stevbe earned 250 total points
ID: 18884474
have you asked them if they are supporting Word 2007?
0
 
LVL 1

Author Comment

by:enkotec
ID: 18938224
I'm not sure which version of VB it's written in, and I have no way to open the app in VB since it's a vendor's product.  The vendor insists they tested it with Office 97 and they've never seen this error.  It works with Word 2003, but as soon as I re-install Word 2007 I'm back to the "4120" error.  Event Viewer doesn't show anything related.  I'm trying to find out if there are relevant error logs for the app that might shed light on the problem.
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 13

Assisted Solution

by:adraughn
adraughn earned 250 total points
ID: 18938808
if you don't have access to the code, you are not going to be able to fix this issue unless you just avoid using it with 2k7. My suggestion would be to contact the developer and, like steve said, ask them if they are supporting 2k7. my guess would be no, since you are getting an error, but they will be able to tell you when/if they are planning on testing on 2k7 and sending out another build.

adria
0
 
LVL 1

Author Comment

by:enkotec
ID: 19087884
No access to the code.  Vendor says they tested on Office 2k7 and haven't seen this error.    Error log for app just says "4120 Bad parameter".  I guess I'm at a roadblock.  There's no information from MS about this error with Office 2k7, so it's either an app-specific problem or an as yet unknown issue with Word 2k7.  Thanks for the input.
0
 
LVL 1

Author Comment

by:enkotec
ID: 20723599
Actual solution found:  
The cause of the error was what appears to be a bug in Word 2007.  If the User Name field in the Word Options > Popular pane is not populated, or contains only spaces, the error occurs.  Populating the User Name field resolved the problem.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

773 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