Best way to create a standard document summary?

C

Carol

After a letter is approved by a manager, I want the author
to be able to add a document summary at the top of the
letter. That summary will contain 15 fields including the
ref number, author, the issue (could be more than 255
characters), etc. I want to be able to refer to the
content of these fields later with a macro, to extract the
information and send it to an mdb database or copy and
paste the field content elsewhere in the document with a
macro.

My question is: how do I create the fields in a summary so
that I can refer to them later. Is this done using ASK
fields, bookmarks, forms, a template or a macro? Could
you please point me in the right direction?
 
C

Charles Kenyon

I would further recommend storing the summary in custom document properties
so that it can be viewed without opening the document.
--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://www.addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://www.addbalance.com/usersguide/index.htm>

Word Resources Page
<URL: http://www.addbalance.com/word/wordwebresources.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
C

Carol

Hi Charles,

How do I do that?
-----Original Message-----
I would further recommend storing the summary in custom document properties
so that it can be viewed without opening the document.
--
Charles Kenyon

Word New User FAQ & Web Directory:
<URL: http://www.addbalance.com/word/index.htm>

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide)
<URL: http://www.addbalance.com/usersguide/index.htm>

Word Resources Page
<URL: http://www.addbalance.com/word/wordwebresources.htm>

See also the MVP FAQ: <URL: http://www.mvps.org/word/> which is awesome!
--------- --------- --------- --------- --------- ------- --
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

all such letters
on
(http://www.mvps.org/word/FAQs/Userforms/CreateAUserForm.ht
m) initiated by
(http://www.mvps.org/word/FAQs/MacrosVBA/DocumentEvents.htm
). The userform
 
C

Carol

Hi Jay, I am slowly making progress thanks to you.

I attached my new template to an existing document. Then
I called the form and filled in the fields with text. I
clicked the command button which is supposed to create the
bookmarks and filled them with the data I just typed in,
but I get the following error message:

Runtime error 5941. The requested member of the
collection does not exist.

Here is a sample of my code again:

Private Sub cmdSave_Click()
With ActiveDocument
If .ProtectionType <> wdNoProtection Then
.Unprotect Password:="Blue"
End If
.Bookmarks("DocRef").Range _
.InsertBefore DocRef End With
UserForm1.Hide
End Sub

P.S. I added the bit about "unprotect" because of one of
the error messages I got previously but I am not sure why
I did that. Is this needed?
 
J

Jay Freedman

Hi, Carol,

The macro does *not* create the bookmarks, it only fills them. You're
getting the error message because the macro refers to a bookmark that
doesn't exist. Your template is supposed to contain the bookmark(s)named in
the macro, so that they'll already be in the new document when the dialog
opens.

The "unprotect" is needed if the template -- and therefore the new
document -- is protected for fields (or for comments or tracked changes)
because the macro can't insert text into a protected area -- just the same
as you're not allowed to type there. If your template isn't protected, but
you're getting an error that mentions protection, then something odd is
going on.
 

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