home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!oasys!ruckman
- From: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
- Newsgroups: comp.os.ms-windows.apps
- Subject: Re: Numbering equations in W4W
- Message-ID: <27710@oasys.dt.navy.mil>
- Date: 20 Nov 92 11:53:30 GMT
- References: <psm.722141203@murlibobo> <k_mcguinness.3@bligh.ntu.edu.au>
- Reply-To: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
- Organization: Carderock Division, NSWC, Bethesda, MD
- Lines: 36
-
- In comp.os.ms-windows.apps, k_mcguinness@bligh.ntu.edu.au8 (Keith McGuinness) writes:
- >In article <psm.722141203@murlibobo> psm@mullian.ee.mu.OZ.AU (Phil Malin) write
- >s:
- >
- >>I was wondering if anyone knows if it's possible to number equations
- >>in Word for Windows 2.0 automatically. I could number them manually
- >>but I would much prefer it if it could be done automatically.
- >
- >Use a SEQ field. Move the insertion point to where you want the number to
- ......
-
- If you're comfortable with writing and using a macro, here's one that
- I use. First, define a Style called "Equation" that has a centered
- tab at the center of the paragraph (for the equation) and a right-aligned
- tab at the right margin (for the equation number). Then use the macro
- shown below. It could be improved in a number of ways, but it works.
-
- Best of Luck!
- Chris
-
-
- ---------------- cut here ----------------
- ' macro to create a centered equation with equation number at right
- ' margin surrounded by parentheses
- Sub MAIN
- InsertPara ' insert a new paragraph for the equation
- InsertPara ' insert another paragraph for the continuing text
- ParaUp ' move selection point to equation paragraph
- Insert " " ' (space between quotes is a tab character) tab to center
- InsertObject .Class="Equation" 'open window to create equation
- Insert " (" ' (space before paren is a tab character) tab to right
- InsertField .Field = "seq Equation" ' insert a sequence field
- Insert ")" ' close paren around equation number
- FormatStyle .Name = "Equation" ' format using style Equation
- End Sub
- ----------------------------------------
-