TIP: Click on subject to list as thread! ANSI
echo: ms_word
to: ALL
from: RAMI RASANEN
date: 1996-05-11 00:16:00
subject: Sample 3270 OLE-Word 3/3

(Continued from previous message)
 ' Word.FontSize 24                      'Make the Font 24 point in size
 ' Word.CenterPara                       'Center Text on page
   Dim i%
   Dim turns%
   x& = EndWaitBox(hwnd&)
   turns% = 1
   hwnd& = WaitBox("Sending Screen Object to Word, Page: " & turns%)
RM:For i = 4 to 20
      Set MyArea = MyScreen.Area(i,2,i,80,,3)
      Word.Insert MyArea.Value           'Insert Area Object Text
      Word.InsertPara                    'Next line
   Next
   turns% = turns% + 1
   x& = EndWaitBox(hwnd&)
   hwnd& = WaitBox("Sending Screen Object to Word, Page: " & turns%)
  'look for Bottom of Page
   Set MyArea = MyScreen.Area(23,11,23,16,,3)
  'MsgBox MyArea.Value
   if MyArea.Value  "Bottom" then
        x& = EndWaitBox(hwnd&)
        hwnd& = WaitBox("Sending Screen Object a Page Forward")
        Sess0.Screen.Sendkeys("")
        Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
        x& = EndWaitBox(hwnd&)
        hwnd& = WaitBox("Sending Screen Object to Word, Page: " & turns%)
       goto RM:
   end if
   Word.FilePrintDefault              'Print the current document
   x& = EndWaitBox(hwnd&)
   hwnd& = WaitBox("Printing from Word")
   Sess0.Screen.Sendkeys("WIB")       'Return user to In Basket
   Sess0.Screen.Sendkeys("")
   Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
   For i = 1 to 10
     doevents        'Waste a little time to complete print spool
   Next
   x& = EndWaitBox(hwnd&)
   hwnd& = WaitBox("Closing Word")
   Word.FileClose 2                   'Close file without saving
   Set Word = Nothing                 'Clear the object pointer
   System.TimeoutValue = OldSystemTimeout
   x& = EndWaitBox(hwnd&)
End Sub
|   ! |
| |  0 !
|  ./#\.  (((RR))) Juggling Tags! (Eagle Eye BBS 305-584-6258)
|   
....Where there's a will, there's a happy Lawyer!
--- WILDMAIL!/WC v4.12 
---------------
* Origin: Eagle Eye 954-584-6258 Internet: rasanen@msn.com (1:369/73.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.