Using trackrevisions and protectedforforms at the same time

C

cunnus88

Again, I thank all of you for providing me with informed, reliabl
answers.

This time, my question has to do with using trackrevisions an
protectedforforms at the same time.

I originally developed my macro in Office 2003. I divided a documen
into sections, and every third section would have the followin
property:

activedocument.sections(currentsectionindex).protectedforforms = true

Finally, I would activate revision tracking.

Activedocument.trackrevisions = true

In office 2003, i got the results I wanted. All the sections whic
weren't protected for forms would allow revisions and the othe
sections (which had dropdown formfields) would allow formfiel
interaction by the user.

Then I took this same macro to an earlier version of office, and, o
dear lord, the formfields would just disappear after I changed th
value of a dropdown formfield.

Is there any way to keep formfields from disappearing in lesse
versions of office
 
A

Anne Troy

So, I assume you're unprotecting and reprotecting the document in your code,
is that right? If so, when you reprotect, you need to "save data". In order
to unprotect the form in Word 2000, you must use the following code before
and after your procedure:
Before:
ActiveDocument.Unprotect Password:=""

After:
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True,
Password:=""

*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com



cunnus88 said:
Again, I thank all of you for providing me with informed, reliable
answers.

This time, my question has to do with using trackrevisions and
protectedforforms at the same time.

I originally developed my macro in Office 2003. I divided a document
into sections, and every third section would have the following
property:

activedocument.sections(currentsectionindex).protectedforforms = true

Finally, I would activate revision tracking.

Activedocument.trackrevisions = true

In office 2003, i got the results I wanted. All the sections which
weren't protected for forms would allow revisions and the other
sections (which had dropdown formfields) would allow formfield
interaction by the user.

Then I took this same macro to an earlier version of office, and, oh
dear lord, the formfields would just disappear after I changed the
value of a dropdown formfield.

Is there any way to keep formfields from disappearing in lesser
versions of office?
http://www.officehelp.in/archive/index.php |
http://www.officehelp.in/index/index.php
 
C

Cindy M -WordMVP-

Hi Cunnus88,
Then I took this same macro to an earlier version of office, and, oh
dear lord, the formfields would just disappear after I changed the
value of a dropdown formfield.
WHICH version? This sounds vaguely familiar... 2000?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
C

cunnus88

I'm sorry if my first inquiry wasn't clear enough.

Let's just simplify the condition.

Activedocument.Trackrevisions = True AN
Activedocument.Sections(EveryThirdSectionIndex).Protectedforforms
True

In Office 2003, the above works fine. I can track revisions an
interact with formfields(all dropdown formfields) at the same time (an
I don't have to make special provisions for the formfields).

If I open the same document using Office XP, the formfields displa
completely different behavior. If I change the value of a dropdow
formfield, it disappears and a small balloon appears on the side sayin
that a formfield value has changed. Needless to mention, the sam
happens for Office 2000.

Is there any way to keep that formfield from disappearing withou
having to set entrymacros where a dropdown formfield activates an
deactivates the boolean value of trackrevisions? (I tried this, and th
results are even more erratic
 
C

Cindy M -WordMVP-

Hi Cunnus88,
Activedocument.Trackrevisions = True AND
Activedocument.Sections(EveryThirdSectionIndex).Protectedforforms =
True

In Office 2003, the above works fine. I can track revisions and
interact with formfields(all dropdown formfields) at the same time (and
I don't have to make special provisions for the formfields).

If I open the same document using Office XP, the formfields display
completely different behavior. If I change the value of a dropdown
formfield, it disappears and a small balloon appears on the side saying
that a formfield value has changed. Needless to mention, the same
happens for Office 2000.

Is there any way to keep that formfield from disappearing without
having to set entrymacros where a dropdown formfield activates and
deactivates the boolean value of trackrevisions? (I tried this, and the
results are even more erratic)
I'd say no, probably not. It looks like MS changed the behavior for
Office 2003, probably due to the introduction of the new type of
protection and the requests by people to use protection and change
tracking together.

FWIW, I'd probably approach this a bit differently and do away with
dropdown lists, if they're the only thing causing a problem. Instead, use
an OnEntry in Text fields to display a small UserForm with the list.
Exiting the UserForm writes the value to the Text form field and moves
focus to the next form field (if that's what you want).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
C

cunnus88

Everyone, thanks for taking the time to reply.

But I found a weird, inelegant workaround to the problem. So now, I ca
have dropdown formfields and track revisions at the same time in Offic
10 but not in 9.

It goes something like this:

thisdocument.Trackrevisions = true
thisdocument.usercontrol = true
for each formfield in thisdocument.formfields
formfield.helptext = ""
next

Don't know why, but it works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top