S
Stretchcoder
I have Visual C++ automating various versions of Word.
I apply Encryption options and add a password, then save the doc.
I get this dialog in 2007 when I try to save a doc that was first created in
Word 97.
"This document is both encrypted and password protected. The Office Open XML
Formats available in the 2007 release provide stronger encryption. Do you
want to increase the security of this document by converting to an Office
Open XML format?"
If I click no everything works fine... the problem is I don't want my user's
seeing Word at all... any idea how to supress this popup?
Thanks!
My code is as follows (simplified since I am using late binding and it's
gross to look at)
get the Application...
result = InvokeWithParams(pApp, _T("Visible"), DISPATCH_PROPERTYPUT,
&vargResult, 1, vFalse);
result = InvokeWithParams(pApp, _T("DisplayAlerts"),DISPATCH_PROPERTYPUT,
&vargResult, 1, vAlertLevel);
result = InvokeWithParams(pDocs, _T("Open"), DISPATCH_METHOD, &vargResult,
1, docName);
result = InvokeWithParams(pDocument, _T("SetPasswordEncryptionOptions"),
DISPATCH_METHOD, &vargResult, 4, vEncryptProperties, vKeyLength, vAlgorithm,
vProvider);
result = InvokeWithParams(pDocument, _T("Password"), DISPATCH_PROPERTYPUT,
&vargResult, 1, vPassword);
result = InvokeWithParams(pDocument, _T("Save"), DISPATCH_METHOD,
&vargResult, 0);
***I get the dialog box here***
close
quit, etc
I apply Encryption options and add a password, then save the doc.
I get this dialog in 2007 when I try to save a doc that was first created in
Word 97.
"This document is both encrypted and password protected. The Office Open XML
Formats available in the 2007 release provide stronger encryption. Do you
want to increase the security of this document by converting to an Office
Open XML format?"
If I click no everything works fine... the problem is I don't want my user's
seeing Word at all... any idea how to supress this popup?
Thanks!
My code is as follows (simplified since I am using late binding and it's
gross to look at)
get the Application...
result = InvokeWithParams(pApp, _T("Visible"), DISPATCH_PROPERTYPUT,
&vargResult, 1, vFalse);
result = InvokeWithParams(pApp, _T("DisplayAlerts"),DISPATCH_PROPERTYPUT,
&vargResult, 1, vAlertLevel);
result = InvokeWithParams(pDocs, _T("Open"), DISPATCH_METHOD, &vargResult,
1, docName);
result = InvokeWithParams(pDocument, _T("SetPasswordEncryptionOptions"),
DISPATCH_METHOD, &vargResult, 4, vEncryptProperties, vKeyLength, vAlgorithm,
vProvider);
result = InvokeWithParams(pDocument, _T("Password"), DISPATCH_PROPERTYPUT,
&vargResult, 1, vPassword);
result = InvokeWithParams(pDocument, _T("Save"), DISPATCH_METHOD,
&vargResult, 0);
***I get the dialog box here***
close
quit, etc