Opening properties box if empty

J

Joseph N.

I would greatly appreciate any help on this. I want to add to certain
Word templates whatever script will have the following effect: If a
document based on that template is opened and the document's Title
property is blank, then the properties box will open so that the user
can add info to the Title field.

I added script to accomplish something similar in Lotus Word Pro
documents, but I cannot figure out what objects would be involved with
Word. I do not know VBA, but I have a general familiarity with how
such languages work.

TIA.
 
G

Greg Maxey

Something like:
Sub AutoOpen()
If ActiveDocument.BuiltInDocumentProperties("Title") = "" Then
With Dialogs(wdDialogFileSummaryInfo)
.Show
End With
End If
End Sub
should do.
 
J

Joseph N.

Greg,

Thanks; that works perfectly.

One follow-up question: Is there a way to tell Word 2003 to allow
macros from me to operate although Macro security is set to High? I
can run your macro if security is set to Medium and the prompt comes
up, but I'd rather have security set to High and have my own macros run
without a prompt. Possible?
 
G

Greg Maxey

Joseph,

If you create a digital certificate and then sign your projects, you
can define yourself as a trusted source. Trusted source macors (I am
pretty sure) run automatically with security set to high once you have
declared yourself a trusted publisher.

See help for "Digital Signature"
 
J

Joseph N.

Alternatively, you can put the code in an add-in. Add-ins are trusted

Are "add-ins" always custom templates--*.dot files--that contain the
desired programming?
 

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