saving with encryption in word, excel 2007

M

Michel Morel

An information message is getting more and more annoying each time my users
save a new encrypted document using legacy .doc (97-2003) or .xls (97-2003)
formats. We use word 2007 and excel 2007:

translated from french :
"This document is encrypted with a password. The open XML formats of Office,
available in the 2007 version, offer a stronger level of encryption. Do you
want to reinforce the security of this document by converting it to the open
XML format of Office?"

Does someone know if there is a way of disabling this (annoying) message?
 
H

Harlan Grove

Michel Morel said:
An information message is getting more and more annoying each time my users
save a new encrypted document using legacy .doc (97-2003) or .xls (97-2003)
formats. We use word 2007 and excel 2007:

translated from french :
"This document is encrypted with a password. The open XML formats of
Office,
available in the 2007 version, offer a stronger level of encryption. Do you
want to reinforce the security of this document by converting it to the
open
XML format of Office?"

Does someone know if there is a way of disabling this (annoying) message?

For both, you may need to save files using macros. Specifically, these
macros would need to set Application.DisplayAlerts to False, then save the
file, then set Application.DisplayAlerts to True. If that doesn't work, then
there's no way to disable/bypass these Oh, So Helpful! messages.
 
M

Michel Morel

Thanks Harlan, setting alerts to false seems like a good idea. Do you know
the VB command to trap the before save/after save events? Again this is for
Word/Excel 2007.

The way I understand it, the idea would be to detect the save event, execute
a macro "before save" command saying Application.DisplayAlerts=False, then
when the save is done, execute an Application.DisplayAlerts=True command.

I can trap the close event, but am looking for a "before save" or "after
save" event trap.
 
H

Harlan Grove

Michel Morel said:
The way I understand it, the idea would be to detect the save event,
execute
a macro "before save" command saying Application.DisplayAlerts=False, then
when the save is done, execute an Application.DisplayAlerts=True command.
....

Not what I meant. Let existing BeforeSave event handlers fire, no need to
modify them. And there is no AfterSave event handler.

What I meant was a regular macro that'd look something like (for Excel, Word
version left to you)


Sub SaveEncrypted()
On Error Goto CleanUp
Application.DisplayAlerts = False
ActiveWorkbook.Save
CleanUp:
Application.DisplayAlerts = True
End Sub


I'm assuming this is saving an existing file. If the problem is saving NEW
files in .doc or .xls file formats with encryption, then you'd need to
include statements like

fn = Application.GetSaveAsFilename(...)

pw = InputBox(...)

ActiveWorkbook.SaveAs Filename:=fn, Password:=pw, . . .

between the Application.DisplayAlerts statements.
 
M

Michel Morel

Harlan Grove said:
....

Not what I meant. Let existing BeforeSave event handlers fire, no need to
modify them. And there is no AfterSave event handler.

What I meant was a regular macro that'd look something like (for Excel, Word
version left to you)


Sub SaveEncrypted()
On Error Goto CleanUp
Application.DisplayAlerts = False
ActiveWorkbook.Save
CleanUp:
Application.DisplayAlerts = True
End Sub


I'm assuming this is saving an existing file. If the problem is saving NEW
files in .doc or .xls file formats with encryption, then you'd need to
include statements like

fn = Application.GetSaveAsFilename(...)

pw = InputBox(...)

ActiveWorkbook.SaveAs Filename:=fn, Password:=pw, . . .

between the Application.DisplayAlerts statements.

Thanks Harlan, you put me on the idea, we worked on this and this piece of
code does not ask any question :

Sub Alertes_Off_fonctionnel()

Documents.Application.DisplayAlerts = False

Documents.Application.DisplayAlerts = wdAlertsNone

Documents.Application.DisplayDocumentInformationPanel = False

ChangeFileOpenDirectory "C:\Users\user18\Desktop\"
ActiveDocument.SaveAs FileName:="test1.doc",
FileFormat:=wdOriginalDocumentFormat, LockComments:=False, Password:="test", _
AddToRecentFiles:=True, WritePassword:="",
ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False,
SaveFormsData _
:=False, SaveAsAOCELetter:=False

Application.DisplayAlerts = wdAlertsAll

End Sub

Of course there is probably more code than necessary, it is bulky but still
works. The fact the file format is specified with SaveAs probably helps.

We're still out there looking for a simpler option in gpo settings or a
simple checkbox in Word options we haven't found, or maybe even a fix from
Microsoft...

Thanks again Harlan!
 

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