Calculated Fields

J

Jim

Hi,
Recently I started using calculated fields in word extensively. I write a
lot of technical documents with a lot of calculation in them. Since all
calculations are chain-like I am assigning values to variables and then use
them. At the end of the document I end up with more than 100 variables which
are difficult to track.
So my question is how can I track my variables in Word (something like a
panel where I can see them)?
Is there any other efficient, or cleverer, way to complete my task?
 
G

Graham Mayor

The following macro list all the docvariables with their values

Sub ShowVariables()
Dim oVar As Variable
Dim sText As String
sText = ""
For Each oVar In ActiveDocument.Variables
sText = sText & oVar.name & vbTab & oVar.Value & vbCr
Next oVar
MsgBox sText
End Sub

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Top