home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / apps / 5138 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.0 KB

  1. Path: sparky!uunet!dtix!oasys!ruckman
  2. From: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
  3. Newsgroups: comp.os.ms-windows.apps
  4. Subject: Re: Numbering equations in W4W
  5. Message-ID: <27710@oasys.dt.navy.mil>
  6. Date: 20 Nov 92 11:53:30 GMT
  7. References: <psm.722141203@murlibobo> <k_mcguinness.3@bligh.ntu.edu.au>
  8. Reply-To: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
  9. Organization: Carderock Division, NSWC, Bethesda, MD
  10. Lines: 36
  11.  
  12. In comp.os.ms-windows.apps, k_mcguinness@bligh.ntu.edu.au8 (Keith McGuinness) writes:
  13. >In article <psm.722141203@murlibobo> psm@mullian.ee.mu.OZ.AU (Phil Malin) write
  14. >s:
  15. >
  16. >>I was wondering if anyone knows if it's possible to number equations
  17. >>in Word for Windows 2.0 automatically.  I could number them manually
  18. >>but I would much prefer it if it could be done automatically.
  19. >
  20. >Use a SEQ field. Move the insertion point to where you want the number to
  21. ......
  22.  
  23. If you're comfortable with writing and using a macro, here's one that
  24. I use.  First, define a Style called "Equation" that has a centered
  25. tab at the center of the paragraph (for the equation) and a right-aligned
  26. tab at the right margin (for the equation number).  Then use the macro
  27. shown below.  It could be improved in a number of ways, but it works.
  28.  
  29. Best of Luck!
  30. Chris
  31.  
  32.  
  33. ---------------- cut here ----------------
  34. ' macro to create a centered equation with equation number at right
  35. ' margin surrounded by parentheses
  36. Sub MAIN
  37. InsertPara    ' insert a new paragraph for the equation
  38. InsertPara    ' insert another paragraph for the continuing text
  39. ParaUp        ' move selection point to equation paragraph
  40. Insert " "    ' (space between quotes is a tab character) tab to center
  41. InsertObject .Class="Equation"    'open window to create equation
  42. Insert " ("   ' (space before paren is a tab character) tab to right
  43. InsertField .Field = "seq Equation"    ' insert a sequence field
  44. Insert ")"    ' close paren around equation number
  45. FormatStyle .Name = "Equation"    ' format using style Equation
  46. End Sub
  47. ----------------------------------------
  48.