Copying tables within a MS Word protected form
March 29, 2013 11:44 PM   Subscribe

I need to find a way to allow users to copy/paste a table that sits within a Word 'protected' form (ie users can only edit within the form fields). We had a series of templates developed by a 'professional', but they have not been able to overcome some version/OS incompatibility issues. The problem is specifically in enabling the table to be selected in the first place, as this function is lost when the protection is applied.

We have a solution that works when the form is used in Windows/Word 2010. Unfortunately, we also require the form to work in Windows/Word 2007 and OSX/Word 2011. I've shared a couple of examples in a folder here. In most cases, we have been able to achieve functionality by inserting 'legacy' controls, but can't get the copy/paste a table function to work.

Sample A has the solution developed by the professional, which works on Office 2010, along with 'legacy' check-box controls to enable compatibility with Win/Word 2007 and OSX/Word 2011, but these legacy controls seem to cause a problem with some of the 'content control' elements elsewhere in the document, meaning that you can no longer enter data in the text fields once you have used one of the legacy controls, until you close and re-open the document. Sample B is a document we have created from scratch that functions fully in all required versions, except it doesn't permit the copying of the table on page 2.

The solution in Sample A seems to have the table within a field of some sort, which allows the table to be selected and copied, while still not allowing anything but the text fields to be edited.

Using anything other than Word is not an option and the compatibility requirements are not negotiable, both due to corporate IT requirements.

Any suggestions gratefully received.
posted by dg to Computers & Internet (8 answers total)
 
Response by poster: Forgot - the sample documents are protected, but there is no password to remove the protection.
posted by dg at 12:31 AM on March 30, 2013


Are you saying that tools other than Word aren't an option for the form solution, or for the copy/paste operation? My first thought is to save the document as HTML, open it in a web browser, and then copy/paste the table out of the web browser back into Word.
posted by XMLicious at 2:06 AM on March 30, 2013


Response by poster: Sorry - Word is the only option for the form solution. Saving the file in a new format and using another application doesn't seem very practical. Although, I now have two days to find a solution, so it may just come to that.
posted by dg at 2:54 AM on March 30, 2013


Save it in html, then copy paste into sublime text 2 and use the multirow select to grab each column. That's what I'd do.
posted by oceanjesse at 6:54 AM on March 30, 2013


Can you use VBA, which will require you to save the docs as .docm instead of .docx?
posted by SuperSquirrel at 7:46 AM on March 30, 2013 [1 favorite]


Response by poster: Yes, we could use .docm files.
posted by dg at 12:22 PM on March 30, 2013


Best answer: I have never used VBA for word files, but I did learn VBA for excel and it allowed me to be able to change the spreadsheet to fit various scenarios (by clicking a button) while keeping the spreadsheet as protected as possible. It really made it very easy to perform my tasks and allow others access to the spreadsheet without worry that they would mess up the formulas.

You might be able to have the sheet add rows by clicking a button perhaps rather than someone needing to physically walk through the steps of copy and paste. In my VBA code I had is specifically unprotect the worksheet, then perform the actions then reprotect the sheet. This is how I got around the protect in excel.

I learned VBA for this project I had a few months ago, so there may be better options for using VBA that a professional would know, but I think it could be done simply depending on what you are exactly looking for.
posted by Jaelma24 at 9:15 AM on March 31, 2013


Response by poster: Update - we haven't been able to come up with a single workable solution and some further examination of the templates prepared by the 'professionals' has revealed some very sloppy formatting and design work in the background that means the templates are probably not salvageable in the longer term. We were able to come up with two different versions that more or less work on both Windows and OSX versions of Word, but not a single version that works on both. We don't have the capacity to write VBA code ourselves and have no faith in the 'professionals' to do so - they weren't really aware this was a possibility until we told them, which is just one of the reasons they've been told to take their money and go away.

We are currently looking at alternatives such as Acrobat and .pdf forms (despite the earlier requirement to stick with .doc - we've now obtained some wiggle room on that).
posted by dg at 11:29 PM on April 29, 2013


« Older what's this maths puzzle doing in my craft...   |   Short-to-medium term transportation options in... Newer »
This thread is closed to new comments.