home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol12n22.zip / FONPIX.ZIP / FONPIX.MAC
Text File  |  1993-11-30  |  2KB  |  85 lines

  1. THIS ASCII FILE contains all three macros illustrated in the Word Processing section of Solutions in Vol 12 Number 22.  In addition, it includes the modification to the thrid macro that is mentioned in the text, but not illustrated.  To use any of these macros, simply open a new macro for editing, copy the text for that macro to the macro editing screen, and save the new macro.  The final macro in eah case should start with:
  2.     Sub MAIN
  3. and end with
  4.     End Sub 
  5.  
  6.  
  7. ***********************
  8. The submitted macro for generating font samples: 
  9. *************************
  10. Sub MAIN
  11. For count = 1 To CountFonts()
  12.     FontStyle$ = Font$(count)
  13.     FormatCharacter .Font = FontStyle$
  14.     Insert "This is a font demo for the font "
  15.     Insert FontStyle$
  16.     InsertPara
  17. Next
  18. End Sub
  19.  
  20.  
  21. ****************************
  22. The Modified macro for generating font samples
  23. ****************************
  24. Sub MAIN
  25. BaseFont$ = Font$()
  26. For count = 1 To CountFonts()
  27.     FontStyle$ = Font$(count)
  28.     FormatCharacter .Font = BaseFont$
  29.     Insert FontStyle$ + " Font"
  30.     InsertPara
  31.     FormatCharacter .Font = FontStyle$
  32.     Insert "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
  33.     InsertPara
  34.     Insert "abcdefghijklmnopqrstuvwxyz"
  35.     InsertPara
  36.     Insert "! @ #$ % ^ & *() _ + - = { } [ ] :  ;<>?,./|\~`"
  37.     InsertPara
  38.     InsertPara
  39. Next
  40. End Sub
  41.  
  42.  
  43. ******************************
  44. The submitted macro for generating picture samples
  45. ******************************
  46. Sub MAIN
  47. PixPath$ = InputBox$("Type in the path to search:"
  48. FileFind .Title = "", .Subject = "", .Author = "", .Keywords = "", .SearchPath = PixPath$ + "\*.*"
  49. If CountFoundFiles() = 0 Then
  50. Goto EndRoutine
  51. Else
  52. For count = 1 To CountFoundFiles()
  53. Pix$ = FoundFileName$(count)
  54. InsertPicture .Name = Pix$, .LinkToFile = 0
  55. InsertPara
  56. Insert "This picture is in the file "
  57. Insert Pix$
  58. InsertPara
  59. Next
  60. EndRoutine:
  61. End Sub
  62.  
  63.  
  64.  
  65. ******************************
  66. The modified macro (not illustrated in the magazine) for generating picture samples
  67. ******************************
  68. Sub MAIN
  69. Dim PixFiles As FileFind
  70. GetCurValues PixFiles
  71. Dialog PixFiles
  72. If CountFoundFiles() = 0 Then
  73. Goto EndRoutine
  74. Else
  75. For count = 1 To CountFoundFiles()
  76. Pix$ = FoundFileName$(count)
  77. InsertPicture .Name = Pix$, .LinkToFile = 0
  78. InsertPara
  79. Insert "This picture is in the file: "
  80. Insert Pix$
  81. InsertPara
  82. Next
  83. EndRoutine:
  84. End Sub
  85.