Solved

Printing from VB6 under Win7

Posted on 2014-11-29
3
55 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 45

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 45

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

744 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

12 Experts available now in Live!

Get 1:1 Help Now