Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2012, 12:05 PM
Cosmo Cosmo is offline Word Form/Merge questions Windows Vista Word Form/Merge questions Office 2007
Competent Performer
Word Form/Merge questions
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 09-18-2012, 03:18 PM
macropod's Avatar
macropod macropod is offline Word Form/Merge questions Windows 7 64bit Word Form/Merge questions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

To use formfields with mailmerge, see: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 09-18-2012, 05:42 PM
Cosmo Cosmo is offline Word Form/Merge questions Windows Vista Word Form/Merge questions Office 2007
Competent Performer
Word Form/Merge questions
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
To use formfields with mailmerge, see: http://www.gmayor.com/Form_Fields_and_Mail_Merge.htm
Thanks, but I neglected to mention that this will be a distributed form, and I have no knowledge or control over the end user's system/setup, or their data source, so an add-in is not going to work.

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).
Reply With Quote
  #4  
Old 09-18-2012, 05:59 PM
macropod's Avatar
macropod macropod is offline Word Form/Merge questions Windows 7 64bit Word Form/Merge questions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 09-18-2012, 06:14 PM
Cosmo Cosmo is offline Word Form/Merge questions Windows Vista Word Form/Merge questions Office 2007
Competent Performer
Word Form/Merge questions
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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).
Actually, that might be fine if I understand it. There are only going to be checkbox form fields (all other fields will be the user's merge fields, or text that they will enter directly into cells in the table). There won't be any other form fields in the document.

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.
Reply With Quote
  #6  
Old 09-19-2012, 01:10 AM
macropod's Avatar
macropod macropod is offline Word Form/Merge questions Windows 7 64bit Word Form/Merge questions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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:
have no knowledge or control over the end user's system/setup, or their data source
In that case, what you're asking them to do is to create a mailmerge from scratch for the purposes of your form. You can't even provide the mailmerge field names, as you don't know what they might be called in the data source. And what, when they've done all that, will be produced? If the result is to be nothing more than the population of a few cells in your table, mailmerge is not the way to go - simply give them a form with formfields they can fill in manually. That would require much less effort all round.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 09-19-2012, 05:57 AM
Cosmo Cosmo is offline Word Form/Merge questions Windows Vista Word Form/Merge questions Office 2007
Competent Performer
Word Form/Merge questions
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
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:

In that case, what you're asking them to do is to create a mailmerge from scratch for the purposes of your form. You can't even provide the mailmerge field names, as you don't know what they might be called in the data source. And what, when they've done all that, will be produced? If the result is to be nothing more than the population of a few cells in your table, mailmerge is not the way to go - simply give them a form with formfields they can fill in manually. That would require much less effort all round.
The reason the merge is required is that the client is specifically asking for that. We have already provided them with a PDF form to fill out (and a Word version as well). This form is quite lengthy (more than just a few cells - there are over 50 fields for this one, others have many more). The reason for this request is they want to provide the user (physician's offices) the ability to pull the relevent data from their patient lists directly into the form, so they don't have to fill out all of the data in the forms one at a time.

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.
Reply With Quote
  #8  
Old 09-19-2012, 06:38 AM
macropod's Avatar
macropod macropod is offline Word Form/Merge questions Windows 7 64bit Word Form/Merge questions Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Form/Merge questions Restrict Editing with Mail Merge Form MEDGE07 Mail Merge 2 05-03-2012 06:14 AM
Word Form/Merge questions Questions on a Word template PHolmes Word 5 11-06-2011 01:54 AM
Word Form/Merge questions 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:30 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft