#1
|
|||
|
|||
Word Form/Merge questions
I have a PDF form that I need to convert to a Word Mail Merge, and my original plan was to add the image into the background, and add a table to the Word documet to add the merge fields into separate cells to match the form. My intention was to lock the table except for the cells where the data was to be entered, and protect the document, but I have found that I cannot use mail merge and protected documents together. This means that the end user is not prevented from adjusting the table, or typing into cells which are not part of the editable field list. I need to keep the data entry areas locked to match the existing form (this cannot be allowed to be altered!)
Is there any way to prevent the end user from editing the document, while allowing them to add/change the data/merge fields in the areas that I need to specify? |
#2
|
||||
|
||||
To use formfields with mailmerge, see: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
My latest idea was to use a macro to unprotect the document, run the mail merge, and then protect the document when finished, but I haven't done any real VBA coding for Word documents before (mostly PPT). I am not sure how feasible this might be (or if it is even possible). |
#4
|
||||
|
||||
The issue you have to recognise is that your formfields won't survive the mailmerge. In that sense, it really doesn't matter whether the document is protected, the result will be the same - no formfields in the output (actually, checkbox formfields will survive).
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
But I still need to be able to lock the form to prevent the user from entering into cells that are not allowed, or adjusting the table cell dimensions. This is a medical form, and the alignment of the data entry fields must be maintained. And once the document is protected, the user cannot run the data merge. The only option I see is using a macro to perform the entire task as I mentioned in my last post, assuming that it is do-able. |
#6
|
||||
|
||||
If the document is designed properly, all that should be required is the application of forms protection after the merge. Of course, if you're worried some changes might be made before the mailmerge is run, you could apply the protection beforehand and use vba to unlock it & run the merge. The problem with that approach, though, is that you'll have to write a lot of code to automate the mailmerge interface as well.
I'm curious, though as to why you believe mailmerge is required. As you say, you: Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Quote:
Unfortunately, I cannot protect the document after the merge, since it will be the end user doing the merge. The protection is required to prevent the user from accidentally (or even intentionally) altering the table that is used to line up the fields with the form image. If a user accidentally drags a row of the table, and information shifts either before or after the information is filled, there could be huge legal issues for our client (extreme case - people die). Not necessarily likely, but our client could be legally responsible if something happens to the form. There is an absolute requirement already that the user cannot alter the text of the form (partly the reason for using an image of the form as a background graphic). I do understand that fully automating the form would require quite extensive code, and may even not be able to work the way I need it to, (as well as requiring more time than the budget would allow), but I feel it is the only option I have to present to our client that is safe enough for them. Thanks again, I appreciate your help. If there are any other suggestions, please let me know. But I have a feeling that my only real option is probably a fully scripted method. |
#8
|
||||
|
||||
Given what you've said so far, it seems to me you're trying to use mailmerge for something it really isn't suited to. Mailmerges are for generating multiple copies of like documents, based on the known structure of a known data source and for which the mailmerge fields are essentially constant. Your requirement seems to necessitate the compilation of a single copy of a document from an unknown data source having an unknown structure and for which the end user is going to have to provide the names of in excess of 50 mergefields at runtime.
And this is supposed to be less error-prone than simply having someone fill out the data manually? Somehow I don't think so. Indeed, your client is making it so hard for someone who isn't a data & mailmerge specialist that they'll more than likely toss it in the too-hard basket. What is more, you'll end up to trying to push this lump of jelly up a wall with a programmer's toothpick, so to speak. All I can say is: good luck with the legal issues - you've go far weightier issues to deal with than the mere risk of "altering the table that is used to line up the fields with the form image".
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Restrict Editing with Mail Merge Form | MEDGE07 | Mail Merge | 2 | 05-03-2012 06:14 AM |
Questions on a Word template | PHolmes | Word | 5 | 11-06-2011 01:54 AM |
Questions on making a form to track research; please help | Lacrosseboss18 | Excel | 3 | 03-13-2011 07:46 PM |
Three easy (certainly for experts!) Word-questions | cindymiller | Word | 3 | 12-26-2010 02:18 AM |