Super Easy Word Merge and restricting editing (1 Viewer)

AlliCarr

New member
Local time
Today, 11:16
Joined
Feb 19, 2024
Messages
11
Hi,

I am using Albert Kallal's super easy word merge in my database. When I add templates I need to be able to restrict editing of the word document for document control purposes. However, this option isn't available when I add the template. Is this intended or should I be able to restrict editing. Is there code that needs amending in the module to allow me to do this?

Any help would be much appreciated.
 

isladogs

MVP / VIP
Local time
Today, 11:16
Joined
Jan 14, 2017
Messages
18,225
The code is open source so you can adapt it for your own purposes including setting access to specific templates
 

AlliCarr

New member
Local time
Today, 11:16
Joined
Feb 19, 2024
Messages
11
The code is open source so you can adapt it for your own purposes including setting access to specific templates
Hi Colin,

I wouldn't really know where to start with updating the code. Although I've learnt loads in terms of VBA programming over the last few months, I'm nowhere near experienced enough to know what to update. I have had a look through the module and wondered whether I need to amend this section below from the EditTemplate and NewTemplate functions and, if so, how.

Code:
  WordDoc.MailMerge.MainDocumentType = 0        ' wdFormLetters = 0

   WordDoc.MailMerge.OpenDataSource _
        Name:=strMergeDataFile, _
        ConfirmConversions:=False, _
        ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
        PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
        WritePasswordTemplate:="", Revert:=False, Format:=0, _
        Connection:="", SQLStatement:="", SQLStatement1:=""
 

isladogs

MVP / VIP
Local time
Today, 11:16
Joined
Jan 14, 2017
Messages
18,225
Hi
Whilst I have used and significantly adapted Albert's code, that was about 15 years ago and I haven't touched it for many years
 

Users who are viewing this thread

Top Bottom