Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unprotected document | Microsoft Word Help | |||
Protected document becomes unprotected | Microsoft Word Help | |||
Checkboxes in an unprotected document | Microsoft Word Help | |||
Tab between unprotected fields of a document | Microsoft Word Help | |||
Protected document becoming unprotected | Microsoft Word Help |