Protected Style snad Mail Merge

S

Sarah_Lecturer

Help!

I have created a document template, locked the styles through Protect
Document, Formatting restrictions... now I cant mail merge when creating a
document based on this template. NEED TO DO THIS!!! Help please! I can
unprotect document - but do not want other users to be able to do this as
they will modify and add styles etc.

Thanks
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2FyYWhfTGVjdHVyZXI=?=,
I have created a document template, locked the styles through Protect
Document, Formatting restrictions... now I cant mail merge when creating a
document based on this template. NEED TO DO THIS!!! Help please! I can
unprotect document - but do not want other users to be able to do this as
they will modify and add styles etc.
Word 2003, I assume...
I'm afraid that any kind of document protection is incompatible with mail
merge. Could you please describe in more detail how users should work with
this document? Will they be editing before or after the merge? (Or both) Is a
macro solution allowed?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :)
 
S

Sarah_Lecturer

Hi Cindy,

I just wanted to stop users from changing the styles or adding to them
within the template - apart from that, they can have full functionality if
that makes sense? Macros could be allowed... any suggestions?

Thanks for your help Cindy

Regards

Sarah xx
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?U2FyYWhfTGVjdHVyZXI=?=,
I just wanted to stop users from changing the styles or adding to them
within the template - apart from that, they can have full functionality if
that makes sense? Macros could be allowed... any suggestions?
You could provide a button in the template, attached to a macro, that
- removes the protection
- executes the merge
- reprotects (or closes) the main merge document
- links the result with a different template (so there's no chance they can
change the original template) or protects the merge result. The code would look
something like this (saved in the template):

Sub MergeProtectedDoc()
Dim doc as Word.Document
Dim docResult as Word.document

Set doc = ActiveDocument
If doc.ProtectionType <> wdNoProtection Then
doc.Unprotect
End If
doc.MailMerge.Execute false
Set docResult = ActiveDocument
doc.Close wdDoNotSaveChanges
docResult.AttachedTemplate = NormalTemplate
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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 :)
 

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