Could you please give us more detail about these "price extensions"? What
kind of field underlies them? In a general way, Word doesn't auto calculate
anything, with the exception of form fields if the proper checkbox is
activated AND the form protection is on.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
--
Quercus Ashley
> The procedure you describe is exactly that which we did in the
> older version of Word2000. Our invoice template and all the customer invoices
> based on it are form protected. Upon starting the application, before opening
> a specific invoice file, we open Tools>Templates and Add-ins; in the field
> of Global templates we check the add-in box for Invoice.dot. This activates
> the field calculations between the Quantity field and the Unit Price field
> and the extension is filled in the Amount column. That column is auto summed
> at the bottom.
> We are trying to replicate this same procedure and results in Word2007. We
> either need to install the add-in and/or activate it, but we have been unable
> to do this.
>
OK, this makes me think that the Invoice.dot template contains macros, and that
certain form fields are linked to those macros (probably "On Exit"). If the
macros can't be found, then nothing happens.
Are you loading Invoice.dot? In Word 2007 you have to go over the Office
button/Word options/Add-ins, select Template Add-ins (I think that's how it's
called) from the dropdown list at the bottom to get the dialog box you already
know.
If that's not working, then I'm guessing macro security is getting in your way.
You want to check that the folder containing this Add-in is set to be a "trusted
location" (that is also in Word Options) in order to allow the macros to run.
(Or the template has to be digitally signed through the VBA Editor with a
signature that's trusted on your system).
> You surmised correctly on the calculation mechinism, and from your
> navigation directions I was able to load the add-in. I am able to make the
> calculations function. It did bring up another issue: The only way I have
> found to make the "calculate on exit" function work is to first unprotect the
> document, double click the field and then check that calculate on exit box.
> This would be a rather time consuming process. Would you know of a way to
> apply an instruction to avoid this necessity and the file would open with the
> calculate on exit already enabled?
>
It should be possible to run a little macro on the document, once, in order to
switch this setting on (all?) the form fields. Here's a bit of sample code
Sub ToggleOnCalculateOnExit()
Dim doc As Word.Document
Dim ffld As Word.FormField
Set doc = ActiveDocument
For Each ffld In doc.FormFields
ffld.CalculateOnExit = True
Next
End Sub
Cindy Meister