borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (page orientation problem - please help)Next Topic (Printing reciept in VB) New Topic New Poll Post Reply
AndreaVB Forum : Printing : fontsize and paper size
Poster Message
ferke
Level: Guest


icon fontsize and paper size

Hi Masters!

Help me please:

How can I setting fontsize of printer if a table width larger then the paper size?

Width of the table is unknown when the print process is starting.

18-08-2004 at 08:45 AM
| Quote Reply
nappel
Level: Protégé

Registered: 06-12-2004
Posts: 6
icon Re: fontsize and paper size

Use Word as COM component

Dim wrd As New Word.Application ''Create Word application from VB
Dim St As String
wrd.Visible = True ''Word is visible
St = "c:/example.doc"
Set DocWord = WordApp.Documents.Open ''Load document
DocWord.Activate

DocWord.Application.Selection.PageSetup.Orientation = wdOrientLandscape 'Page orientation - landscape

DocWord.Application.Selection.Font.Color = wdColorBlue 'Set font color

DocWord.Application.Selection.Font.Size = 12  'Set font size

DocWord.Application.Selection.Font.Name = "Tahoma" 'Set font type

Printing

wrd.ActiveDocument.PrintOut Copies:=1, Pages:="1,2", ManualDuplexPrint:=False 'One side printing pages 1 and 2

DocWord.SaveAs "c:\DDD.doc" 'Save doc

It's not difficult!



____________________________
http://word.oflameron.ru

04-04-2006 at 08:27 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : Printing : fontsize and paper size
Previous Topic (page orientation problem - please help)Next Topic (Printing reciept in VB) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder