Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do PageSetup and then Print document in WordPad

Status
Not open for further replies.

jche

Programmer
Nov 5, 2002
4
SG
Hi there
I need to automate the printing of wordpad documents using VB. The following code is what I have written :-

Dim filename As String
Dim wp As String
Dim actApp As String


filename = "test1.txt"
wp = "c:\wordpad.exe c:\MyDocuments\" + filename
Shell wp

' to change focus to WordPad app
actApp = filename + " - WordPad"
AppActivate actApp

I believe the above will make the wordpad application window active. But what do I do next to change the left and right margins of the document and print from here?

I need to open up the document in order to print becoz the document contains Chinese characters. So I need to open up the document so that a Chinese translator software at my PC will display them correctly before printing. Pls help and advise. Thanks alot for your kind attention.

Rgds
jche...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top