Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
RPJ RPJ is offline
external usenet poster
 
Posts: 4
Default Unprotected Word Document is Changed?

When I unprotect a Word (2003) form document and then reprotect it (without
having made any changes at all) - closing the document causes the "Do you
want to save the changes to ......" message to appear.

Is it possible to unprotect / protect a Word document without it being
mysteriously changed by Word (n.b. there are no changes to "Undo")?

I am trying to write a VBA Macro to unprotect the document, interrogate the
status of cell within a table and then, optionally, reprotect the document
without changing it: Can this be done?

All offers of help will be very gratefully received.

RPJ
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Peter T. Daniels Peter T. Daniels is offline
external usenet poster
 
Posts: 3,215
Default Unprotected Word Document is Changed?

Turning protection on or off is itself a change. There's been no
change in the content of the document.

On Oct 7, 10:04*am, RPJ wrote:
When I unprotect a Word (2003) form document and then reprotect it (without
having made any changes at all) - closing the document causes the "Do you
want to save the changes to ......" message to appear.

Is it possible to unprotect / protect a Word document without it being
mysteriously changed by Word (n.b. there are no changes to "Undo")?

I am trying to write a VBA Macro to unprotect the document, interrogate the
status of cell within a table and then, optionally, reprotect the document
without changing it: *Can this be done?

All offers of help will be very gratefully received.

RPJ


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Unprotected Word Document is Changed?

Yes and no. Opening the document and unprotecting it is seen as a change so
you cannot do that without Word seeing that as a change. However you can
close the document again without saving it after interrogating it e.g.

ActiveDocument.Close WdDoNotSaveChanges

You don't need to unprotect the document to read the content of a form
field.

Take a look at the examples at
http://www.gmayor.com/ExtractDataFromForms.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



RPJ wrote:
When I unprotect a Word (2003) form document and then reprotect it
(without having made any changes at all) - closing the document
causes the "Do you want to save the changes to ......" message to
appear.

Is it possible to unprotect / protect a Word document without it being
mysteriously changed by Word (n.b. there are no changes to "Undo")?

I am trying to write a VBA Macro to unprotect the document,
interrogate the status of cell within a table and then, optionally,
reprotect the document without changing it: Can this be done?

All offers of help will be very gratefully received.

RPJ



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
RPJ RPJ is offline
external usenet poster
 
Posts: 4
Default Unprotected Word Document is Changed?

Gentlemen,

Thank you both very much for your incredibly swift responses.

I think the answer to my question is "NO" because:
a) it is not possible to "undo" the changes in status of the document
(from protected to unprotected and back again)
b) I do not wish to close the document in my Macro - but neither do I
want the user to receive the "save changes?" message if they should
chose to manually close the document at this point.

HoHum

Thanks again,

RPJ

"Graham Mayor" wrote:

Yes and no. Opening the document and unprotecting it is seen as a change so
you cannot do that without Word seeing that as a change. However you can
close the document again without saving it after interrogating it e.g.

ActiveDocument.Close WdDoNotSaveChanges

You don't need to unprotect the document to read the content of a form
field.

Take a look at the examples at
http://www.gmayor.com/ExtractDataFromForms.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



RPJ wrote:
When I unprotect a Word (2003) form document and then reprotect it
(without having made any changes at all) - closing the document
causes the "Do you want to save the changes to ......" message to
appear.

Is it possible to unprotect / protect a Word document without it being
mysteriously changed by Word (n.b. there are no changes to "Undo")?

I am trying to write a VBA Macro to unprotect the document,
interrogate the status of cell within a table and then, optionally,
reprotect the document without changing it: Can this be done?

All offers of help will be very gratefully received.

RPJ




  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Unprotected Word Document is Changed?

If you don't want to close the document then mark it as saved after you have
finished processing it with your macro eg

ActiveDocument.Saved = True

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



RPJ wrote:
Gentlemen,

Thank you both very much for your incredibly swift responses.

I think the answer to my question is "NO" because:
a) it is not possible to "undo" the changes in status of the document
(from protected to unprotected and back again)
b) I do not wish to close the document in my Macro - but neither do I
want the user to receive the "save changes?" message if they should
chose to manually close the document at this point.

HoHum

Thanks again,

RPJ

"Graham Mayor" wrote:

Yes and no. Opening the document and unprotecting it is seen as a
change so you cannot do that without Word seeing that as a change.
However you can close the document again without saving it after
interrogating it e.g.

ActiveDocument.Close WdDoNotSaveChanges

You don't need to unprotect the document to read the content of a
form field.

Take a look at the examples at
http://www.gmayor.com/ExtractDataFromForms.htm


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



RPJ wrote:
When I unprotect a Word (2003) form document and then reprotect it
(without having made any changes at all) - closing the document
causes the "Do you want to save the changes to ......" message to
appear.

Is it possible to unprotect / protect a Word document without it
being mysteriously changed by Word (n.b. there are no changes to
"Undo")?

I am trying to write a VBA Macro to unprotect the document,
interrogate the status of cell within a table and then, optionally,
reprotect the document without changing it: Can this be done?

All offers of help will be very gratefully received.

RPJ





Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unprotected document Gaz Microsoft Word Help 1 September 8th 08 01:04 PM
Protected document becomes unprotected Gabriella777_2 Microsoft Word Help 3 June 19th 07 02:55 PM
Checkboxes in an unprotected document Kara Microsoft Word Help 1 August 24th 06 11:30 AM
Tab between unprotected fields of a document Carlsbad Microsoft Word Help 2 April 5th 06 11:30 PM
Protected document becoming unprotected dmpeters424 Microsoft Word Help 1 February 15th 05 03:14 PM


All times are GMT +1. The time now is 12:00 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"