VBA printing control

I am writing VBA code in a third party app and I need to create pages and have them printed. As it is not a VB6 app, I don't have access to the printer object which is found in VB6.olb. I found the printerserver.dll library helps but it wont let me print graphics!
When I try adding vb6.olb to the references in vba, the app crashes when run!
Any help would be great!
mortonkrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
We need a bit more information...
1. VBA is not really a standalone programming language, ...typically it is associated with one of the MS Office Applications...
Which app are you building this for?
2.  " I need to create pages and have them printed."
...What does this mean?, ...what type of Pages? (report pages?, form pages?, web pages?

In other words, can you take a step back and explain to us the purpose of his application.

To be clear, vba does have tools to let you access the Printer collection:
https://msdn.microsoft.com/en-us/library/office/Aa223132%28v=office.11%29.aspx

 ...we just need to understand what this app is intended to do...

JeffCoachman
0
mortonkrAuthor Commented:
Hi Jeff,

The app is a SCADA package by Rockwell Automation and has no relation to Microsoft other than VBA.
I want to print a report including text and graphics. I have done this before by building a dll that accesses the vb.global printer object but this seems clumsy and it means I have to install vb runtime on the target machine (dll built with VB6).
There us no printer object in VBA with this app.
0
Boyd (HiTechCoach) Trimmell, Microsoft Access MVPCommented:
Microsoft used to license VBA to developers to add scripting to their own Mon-Microsoft applications. AFAIK they have discontinued this for any new licenses.

... but this seems clumsy and it means I have to install vb runtime on the target machine (dll built with VB6).
From my experience this it is a common practice to use VB6 and now  .NET to do what you want.

I regular work with tools that extend Office apps with VB6 and now .NET. I am starting to do the same with .NET. While it might seam clumsy, I think it is the future for now.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.