home *** CD-ROM | disk | FTP | other *** search
- 'Word v6.0 macro to convert a .PRC or .PDB document into a temporary 'text file, and then open it.
-
- 'Written April 1997 by D A MacLeod, davmac@bigfoot.com
-
- Sub MAIN
-
- 'file locations and constants
- MakeDoc$ = "c:\pilot\add-on\makedoc7.exe"
- TempDoc$ = "c:\temp\fred.txt"
- OpenFrom$ = "c:\pilot\add-on"
- FileMask$ = "*.prc;*.pdb"
-
- 'Change to the directory where the forms are located
- ChDir OpenFrom$
-
- 'Choose which .PRC or .PDB file
- Dim dlg As FileOpen
- GetCurValues dlg
- dlg.Name = FileMask$
- On Error Goto Done
- Dialog dlg
- On Error Goto 0
-
- 'Start Makedoc and convert the DOC file to a temporary text file
- Shell MakeDoc$ + " -d " + dlg.Name + " " + TempDoc$, 0
-
- 'Wait until conversion has finished
- WaitMsg$ = "Converting " + dlg.Name
- While AppIsRunning("makedoc")
- WaitMsg$ = WaitMsg$ + "."
- Print WaitMsg$
- For Delay = 1 To 100
- Next Delay
- Wend
-
- 'Open the temporary text file
- FileOpen TempDoc$
-
- Done:
-
- End Sub