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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing BOLD text with EXTRA! 2000a?

Status
Not open for further replies.

Supra

Programmer
Dec 6, 2000
422
US
Hey folks. I have the following code to print the screen in EXTRA:
Code:
Sub Main

    Dim rc%, row%, MaxColumns%, MaxRows%, filenum%
    Dim Screenbuf$, linebuf$, FileName$
    Dim System as Object
    Dim Session as Object
    dim Screen as Object
    
    Set System = CreateObject("EXTRA.System")
    If (System is Nothing) Then
        Msgbox "Could not create the EXTRA System object.  Aborting macro playback."
    Stop
    End If

    Set Session = System.ActiveSession
    If (Session is Nothing) Then
    Msgbox "Could not create the Session object.  Aborting macro playback."
    Stop
    End If

    Set Screen = Session.Screen
    
    MaxRows% = Session.Screen.Rows()
    MaxColumns% = Session.Screen.Cols()
 
    Screenbuf$ = ""
    linebuf$ = Space$(MaxColumns%)

    For row% = 1 to MaxRows%
        linebuf$ = Session.Screen.Area(row%, 1, row%, MaxColumns%, , xBlock)
        screenbuf$ = screenbuf$ + linebuf$ + Chr$ (13) + Chr$ (10)
    Next
    
    filenum% = FreeFile
    FileName$ = "\\myServer\myPrinter"
    
    Open FileName$ For Output as filenum%
        Print # filenum%, screenbuf$; Chr$ (12)
    Close filenum%

End Sub
This works fine to print the screen, however all formatting is lost in the process because the text is held in a string. Is there any to print the text without losing the formatting?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top