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
> > > I have created a document template, locked the styles through Protect
> > > Document, Formatting restrictions... now I cant mail merge when creating a
[quoted text clipped - 7 lines]
> > 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 :-)