Re: using print in VBASIC 6
From: Joe \ (joe_at_bftsi0.UUCP)
Date: 02/22/04
- Next message: MikeD: "Re: using print in VBASIC 6"
- Previous message: Verle: "using print in VBASIC 6"
- In reply to: Verle: "using print in VBASIC 6"
- Next in thread: MikeD: "Re: using print in VBASIC 6"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 22 Feb 2004 14:18:28 -0800
"Verle" <k8vw(dontuse)@tir.com> wrote in message <news:4DFF3367-B82B-4869-8235-CA3411E4D904@microsoft.com>...
> When I try to use print text what prints out an unreadable font showing
> the correct number of characters. I am using an HP DeskJet 672C
> printer which works fine for everything else. Can anyone help me out?
You probably need to set the font. This function might be helpful:
Public Function Font(Optional ByVal Name As String, Optional ByVal Size As Currency = -1@, _
Optional ByVal Weight As Integer = -1, Optional ByVal Charset As Integer = -1, _
Optional Bold As Boolean, Optional Italic As Boolean, _
Optional Strikethrough As Boolean, Optional Underline As Boolean) As StdFont
Set Font = New StdFont
If Len(Name) > 0 Then Font.Name = Name
If Size >= 0 Then Font.Size = Size
If Weight >= 0 Then Font.Weight = Weight
If Charset >= 0 Then Font.Charset = Charset
If Bold Then Font.Bold = Bold
If Italic Then Font.Italic = Italic
If Strikethrough Then Font.Strikethrough = Strikethrough
If Underline Then Font.Underline = Underline
'With Font
' Debug.Print "Font("""; .Name; """;"; .Size; ";"; .Weight; ";"; .Charset;
' Debug.Print "; "; .Bold; "; "; .Italic; "; "; .Strikethrough; "; "; .Underline; ")"
'End With
End Function
You may need to select "OLE Automation" in the References.
Use Font() like this:
Set Printer.Font = Font("Arial", 10)
Printer.Print "This is a test!"
' etc etc etc
-- Joe Foster <mailto:jlfoster%40znet.com> Got Thetans? <http://www.xenu.net/> WARNING: I cannot be held responsible for the above They're coming to because my cats have apparently learned to type. take me away, ha ha!
- Next message: MikeD: "Re: using print in VBASIC 6"
- Previous message: Verle: "using print in VBASIC 6"
- In reply to: Verle: "using print in VBASIC 6"
- Next in thread: MikeD: "Re: using print in VBASIC 6"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|