
Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> You don't need to use code at all. If you include a NUMPAGES field in the
> template, it will automatically update to show the total number of pages in
> any document based on the template.
>
>--
I am not able to use a special designed template with a pre inserted field,
as users are spread all over the world, with an unknown numbers of formats
and versions. So I can only use the local Normal.dot template, and start from
schratch.
Regards
Jens
Jonathan West - 10 Jun 2005 17:02 GMT
>> You don't need to use code at all. If you include a NUMPAGES field in the
>> template, it will automatically update to show the total number of pages
[quoted text clipped - 10 lines]
> Regards
> Jens
OK, If you are using late binding, then the only change you need make to the
line of code you had before is to substitute the value of wdFieldNumPages
for the constant itself. This constant has the value 26.
By the way, I would be very surprised if it really is impossible to
distribute a template as part of your application. Since you have no idea
what kinds of mess users may have made of their normal.dot, distributing
yourown template would probably increase the stability of your application

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org