Solved

Printing from VB6 under Win7

Posted on 2014-11-29
3
57 Views
Last Modified: 2014-12-02
I have a legacy VB6 program I created years ago. It creates two outputs. One is a plain .txt file. The other is a complicated graphic. Both are one sheet.

Under XP, I used the VB "Common Dialog" OCX to select printing font. I would rather not hassle with registering that OCX in Win 7.

What is the most straightforward way to write to a file from VB6 without invoking an OCX? Writing to a pdf file would do fine. I could set the font in code myself.

I will have to resurrect my old XP machine to make these coding changes. <sigh>  Haven't bothered to install VB6 on my Win7 machine. I suppose I could.
0
Comment
Question by:NormaPosy
  • 2
3 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40472056
Printer.font.size = 12 ' or whatever
Printer.Print ' a line
0
 

Author Closing Comment

by:NormaPosy
ID: 40476963
Thank you.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40477167
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Validating VB6 Function 19 56
How to debug this code 7 56
VBA filters 2 51
How to Add / Edit Windows Menu 4 52
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

867 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now