Auto Text Fields in word

W

Wayne

I have an Auto Text field that is filled out by an application. The text
that is populated happens to be a date and time, I need to create another
field in the same document that references the Auto Text field and do some
date math on it.

Is it possible to reference an Autotext field in a formula? I've tried and
not been very successful. If not a formula how should I go about doing this?

Thanks
Wayne
 
W

Wayne

I found that yesterday, however it deals with DATE Fields. What I have isn't
a DATE FIELD but an AUTO TEXT field. I've not figured out how to use the
AUTO TEXT field in a formula yet, even something as simple as just saying
Formula=MyAutoTextField

Thanks
Wayne
 
G

Graham Mayor

Your original post stated that the field was populated by date and time
information. It doesn't matter where you derive the information from, if you
are performing calculations on dates then the complication addressed
remains.

For simple numbers you can insert an autotext field in a calculation e.g.
{={Autotext Name}+5} but this will not work for dates.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
W

Wayne

Well it is actually a date that I am putting into the Autotext, so I guess
its a date field. I'm fairly new at using word, up till now it was just a
spell checker for me.

as for the below

{={Autotext Name}+5}

I've tried this, and referenced one of my Autotext fields that result in a
simple integer being placed in the field. Typing it in as you have it,
replacing "Name" with the name of my autotext field, InspectionID, I receive
the following error:

!Syntax Error, {

not sure if it's complaining about the first or second {, if I change the {}
to () I then get a syntax error on InspectionID.

Any other ideas?
Thanks
Wayne
 
G

Graham Mayor

The curly brackets are placed with CTRL+F9 and not typed from the keyboard.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
W

Wayne

I've done that and it gives me the error. I've also chose insert -->
Field --> Formula, but still get the same error.

Thanks
Wayne
 
G

Graham Mayor

Your autotext entry must contain something other than a number.
Type the number 5 in a line of text in a document. Select the 5 (but not the
space on either side).
Save it as an autotext entry called Name
Press CTRL+F9 - {}
between the brackets type = + 5
{=+5}
between the = and + signs
Insert > field > autotext > Name
Select the fields and press ALT+F9 - then F9 to update
The display should show 10


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
W

Wayne

THANK YOU!!!!!!!

That works perfectly, time go look at the date document and figure out how
to update my date/time now.

Thanks
Wayne
 

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