Solved

Printing from VB6 under Win7

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
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…

809 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