Check Dictionary, Paper Size, etc

W

Writer

Does anyone know how to build in some VBA code that will check that the
office template has the following attributes assigned at startup:

1. Paper size = A4
2. Standard Set of Styles is being used
3. Language = Australian

and so forth.
 
J

Jezebel

Writer said:
Does anyone know how to build in some VBA code that will check that the
office template has the following attributes assigned at startup:

1. Paper size = A4

activedocument.PageSetup.PaperSize = wdPaperA4
2. Standard Set of Styles is being used

Depends what you mean by the 'standard set of styles'. This usually means
whatever styles are defined in the template.
3. Language = Australian

activedocument.Styles("normal").LanguageID = wdEnglishAUS

If you really want to be thorough, you need to check this for every style.


However, these questions suggest a misconception about how to use templates
in an organisation: part of their function is precisely to standardise these
matters. So checking the template is self-defeating: if a user has made
unauthorized changes to the office template, then won't they also have
zapped the code you're proposing to run?
 
W

Writer

Jezebel said:
activedocument.PageSetup.PaperSize = wdPaperA4


Depends what you mean by the 'standard set of styles'. This usually means
whatever styles are defined in the template.


activedocument.Styles("normal").LanguageID = wdEnglishAUS

If you really want to be thorough, you need to check this for every style.


However, these questions suggest a misconception about how to use templates
in an organisation: part of their function is precisely to standardise these
matters. So checking the template is self-defeating: if a user has made
unauthorized changes to the office template, then won't they also have
zapped the code you're proposing to run?
 
W

Writer

Hi Jezebel,

I agree with you... do you have any ideas where security is concerned?

Writer
 
J

Jezebel

Hi Jezebel,
I agree with you... do you have any ideas where security is concerned?

Writer

If you're worried about people making unauthorized changes to documents and
templates, the general answer is: politely ask them not to. Most users will
respect that (or don't know enough to screw around anyway); and there's
truly nothing you can do to stop a determined, maliciously inclined user. If
they want to fake a version of your letterhead with their own address on it,
they can always create it from scratch.
 

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