Math Autocorrect

  • Thread starter Thread starter Perspicacity
  • Start date Start date
P

Perspicacity

Is there any way to print this table in Word or is there a copy available
somewhere on the web? I need to put equations into documents occasionnally
and this could be a quicker way to do so, but without knowning what is
available or having to open up the table itself every time it is kind of
useless.
 
Also, if you add your own entries to the Math AutoCorrect list, you can
produce a similar table that includes them, by running this macro (see
http://www.gmayor.com/installing_macro.htm if needed):

Sub DumpMathAutoCorrectTable()
Dim oDoc As Document
Dim oTbl As Table
Dim oRg As Range
Dim oMAC As OMathAutoCorrectEntry

Set oDoc = Documents.Add
Set oTbl = oDoc.Tables.Add(Range:=oDoc.Range, _
numrows:=2, numcolumns:=2)
With oTbl
Set oRg = .Cell(1, 1).Range
oRg.Collapse wdCollapseStart
oRg.Text = "Name"

Set oRg = .Cell(1, 2).Range
oRg.Collapse wdCollapseStart
oRg.Text = "Value"

.Rows(1).HeadingFormat = True
.Rows(1).Range.Bold = True
End With

On Error Resume Next
For Each oMAC In Application.OMathAutoCorrect.Entries
With oMAC
Set oRg = oTbl.Cell(oTbl.Rows.Count, 1).Range
oRg.Collapse wdCollapseStart
oRg.Text = .Name

Set oRg = oTbl.Cell(oTbl.Rows.Count, 2).Range
oRg.Collapse wdCollapseStart
oRg.Text = .Value

oTbl.Rows.Add
End With
Next

oTbl.Rows(oTbl.Rows.Count).Delete
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top