Hello Sir,
I am writing a program to open word document using VB6.
I want to fix the print setup to A5 pagesize.
Alo I want to display the text in richtextbox in word document using VB6.
Can you please help me.
Thanks in advance
Oomar,
Using Word with VB6, I show how you set the page size to A5:
Sub AutomateWord()
' Declare the variable.
Dim objWD As Word.Application
' Set the variable (runs new instance of Word.)
Set objWD = CreateObject("Word.Application")
' Add a new document.
objWD.Documents.Add
' Add some text.
objWD.Selection.TypeText "This is some text."
'Set Page Size
objWD.ActiveDocument.PageSetup.PaperSize = wdPaperA5
' Save the document.
objWD.ActiveDocument.SaveAs FileName:="mydoc.doc"
' Quit Word.
objWD.Quit
' Clear the variable from memory.
Set objWD = Nothing
End Sub
Hope this helps!
Here are the instructions for duplex printing.
The duplex printing function allows you to print data on both sides of a sheet of paper.
The procedure for performing duplex printing is as follows:
1. Open the printer driver setup window, and check the Duplex Printing check box on the Page Setup tab.
2. Select Normal-size Printing (or Fit-to-Page Printing, Scaled Printing or Page Layout Printing) from the Page Layout list.
3. Specify Staple Side.
The printer analyzes the Orientation and Page Layout settings, and automatically selects the best staple position. Check the Staple Side setting. If you want to change the setting, select another value from the list.
4. If necessary, click Specify Margin... and set the Margin width.
5. Click OK.
If a media type other than Photo Paper Plus Double Sided is selected for Media Type on the Main tab:
When you execute print, the document will be printed on one side of a sheet of paper. When printing is complete, reload paper according to the displayed message and then click OK. The document will be printed on the opposite side.
If Photo Paper Plus Double Sided is selected for Media Type on the Main tab:
When you execute print, the document will be printed front and back alternately for one sheet at a time. Load the paper according to the displayed messages.
Note
Duplex Printing is unavailable when:
- A media type other than Plain Paper or Photo Paper Plus Double Sided is selected from the Media Type list.
- Poster Printing is selected from the Page Layout list.
When Booklet Printing is selected from the Page Layout list, Duplex Printing and Staple Side appear grayed out and are unavailable.
You can download a users manual for your MX310 at
Please rate this solution. Thanks.
146 views
Usually answered in minutes!
×