Form in Word data keeps getting wiped out

I have a protected Word form that I got from someone. Every so often, I think it happens when I edit one of the FORMTEXT fields, my data keeps on getting wiped out, and I need to start over from scratch.

PLEASE can someone help me?
LVL 10
etech0Asked:
Who is Participating?
 
web_trackerComputer Service TechnicianCommented:
Is the form that someone sent you write protected? Or can only be viewed and not edited? What I would do is copy the form, then create a new document, then paste the form in the new document, you should be able to enter data into the form then save it, as a new document.
0
 
GrahamSkanRetiredCommented:
Word used to clear the data in form fields when protection was turned on.

It is still the default when protection is set via VBA. Perhaps the someone has put some code in to turn the protection off and on again and has forgotten to set the NoReset parameter to True
0
 
PlantwizCommented:
Does your version of WORD match the one the file was created it in?  It shouldn't matter, but perhaps the creator of the file could save it down a version to see if you continue to have the same problem.

Also, I agree about creating a new file or as soon as you open it, do a SAVE AS and give it a new name.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
etech0Author Commented:
Thanks for your prompt responses.

It is write protected, without a password.

When I received it (about a month ago) I copied it into a new document to edit it. I've been using it since, and only had that problem yesterday and today.

The document was a .doc. I tried saving it as .docx, but it didn't help.

When I open it, I get a message that macros have been disabled. But when I go into the VBE, there are no macros! How can I check if the form is protected via VBA if there is no VBA code in the document? Can VBA be hidden?

Thanks.
0
 
GrahamSkanRetiredCommented:
It is just possible that there are Exit (or Enter) macros set to be called from one or more of the form fields. It there are macros of that name in a global (e.g. the Normal) template, they could be firing.

The document might have become corrupt,  do it could be worth copying the open, unprotected document and pasting to a blank document
0
 
etech0Author Commented:
I tried copying into a new document and saving as, we'll see what happens.

How can I check for exit or enter macros?
0
 
PlantwizCommented:
This would permit disabling running a macro at startup:
http://word.mvps.org/FAQs/InterDev/DisableAutoMacros.htm

However, I am not certain this is what you really want, thought it may be a temp workaround.

Depending on your WORD version:
This allows for turning off form protection without losing the input values:
Sub ToggleFormProtect()
   If ActiveDocument.ProtectionType = wdNoProtection Then
      ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
      MsgBox "The document has been protected"
   Else
      ActiveDocument.Unprotect
      MsgBox "The document is now unprotected"
   End If
End Sub

Open in new window


And one of my favorite MVP sites for macro help (or reference)
http://word.mvps.org/FAQs/MacrosVBA/
0
 
etech0Author Commented:
Thanks, all! Copying to a blank document did the trick.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.