Click here to Skip to main content
15,911,848 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: searching a map Pin
Christian Graus17-Apr-05 17:43
protectorChristian Graus17-Apr-05 17:43 
General_MM_SHUFFLE question Pin
swati2415-Apr-05 23:09
swati2415-Apr-05 23:09 
GeneralClear the screen Pin
Larsson14-Apr-05 21:10
Larsson14-Apr-05 21:10 
GeneralRe: Clear the screen Pin
IdUnknown15-Apr-05 15:23
IdUnknown15-Apr-05 15:23 
General2005 Beta-1 C++/CLI Pin
TFB14-Apr-05 7:30
TFB14-Apr-05 7:30 
GeneralRe: 2005 Beta-1 C++/CLI Pin
Sheng Jiang 蒋晟20-Apr-05 12:33
Sheng Jiang 蒋晟20-Apr-05 12:33 
GeneralRe: 2005 Beta-1 C++/CLI Pin
TFB21-Apr-05 6:58
TFB21-Apr-05 6:58 
GeneralMicrosoft Word - Read Only and DisplayAlerts Ignored (important) Pin
User 172888413-Apr-05 23:43
User 172888413-Apr-05 23:43 
Hi,

So I am programming in C++ to access office documents in the background (so nothing is visible)

It's important that I don't get any visible notifications or pop-up windows.


Now working with Powerpoint and Excel gives no problem.

But if I try to open a Word document that allready is open I get this annoying messagebox "Open as Read Only - Notify - Cancel"

This messagebox should NOT appear because I set the "DisplayAlerts" - property of the Word application to false
Plus I explicit say to open the document as "read only"

If I run a macro (vb) with these requirements I don't get any messages but in C++ I do

Here's the code in c++


dhCheck( dhCreateObject(L"Word.Application", NULL, &wdApp) );
dhPutValue(wdApp, L".Visible = %b", FALSE);
dhPutValue(wdApp, L".Assistant.On = %b", FALSE);
dhPutValue(wdApp, L".DisplayAlerts = %d", 0);

dhGetValue(L"%o", &wdDoc, wdApp, L".Documents.Add");
dhGetValue(L"%o", &wdDoc, wdApp,
L".Documents.Open(%s%b%b%b%s%s%b)", inpath, FALSE, TRUE,
FALSE, "", "", TRUE);


NOTE that I explicit set the DisplayAlerts to False (0)
PLUS that I open the file as READ ONLY

So I really don't understand
1: why I still get A message
2: why I am asked again to open the file as read only after I allready
explicit told the application to do so

It's really important that I find a solution or at least a decent explanation

Hopely someone can help me here
christophe.keteleer@gmail.com
GeneralRe: Microsoft Word - Read Only and DisplayAlerts Ignored (important) Pin
ursus zeta14-Apr-05 10:04
ursus zeta14-Apr-05 10:04 
GeneralAccess Denied Reading Registry Pin
rexpiper13-Apr-05 7:25
rexpiper13-Apr-05 7:25 
GeneralRe: Access Denied Reading Registry Pin
rexpiper13-Apr-05 7:37
rexpiper13-Apr-05 7:37 
Generalout of paper error Pin
thamate12-Apr-05 22:28
thamate12-Apr-05 22:28 
Generalstoring diffgram element values in database tables Pin
gauravmitra12-Apr-05 0:59
gauravmitra12-Apr-05 0:59 
GeneralConvert char to int Pin
Larsson10-Apr-05 8:21
Larsson10-Apr-05 8:21 
GeneralRe: Convert char to int Pin
Christian Graus10-Apr-05 11:53
protectorChristian Graus10-Apr-05 11:53 
GeneralRe: Convert char to int Pin
ddmcr11-Apr-05 9:07
ddmcr11-Apr-05 9:07 
GeneralRe: Convert char to int Pin
Larsson12-Apr-05 5:30
Larsson12-Apr-05 5:30 
GeneralRe: Convert char to int Pin
Christian Graus12-Apr-05 15:10
protectorChristian Graus12-Apr-05 15:10 
GeneralVC++.NET2003 - Error C2146 Compiler Conformance Pin
JSadleir10-Apr-05 0:39
JSadleir10-Apr-05 0:39 
GeneralRe: VC++.NET2003 - Error C2146 Compiler Conformance Pin
Nick_Kisialiou10-Apr-05 13:43
Nick_Kisialiou10-Apr-05 13:43 
GeneralRe: VC++.NET2003 - Error C2146 Compiler Conformance Pin
JSadleir10-Apr-05 13:53
JSadleir10-Apr-05 13:53 
Generallinking error Pin
Member 16179999-Apr-05 5:46
Member 16179999-Apr-05 5:46 
GeneralRe: linking error Pin
ursus zeta10-Apr-05 11:14
ursus zeta10-Apr-05 11:14 
GeneralRe: linking error Pin
Member 161799912-Apr-05 4:49
Member 161799912-Apr-05 4:49 
GeneralRe: linking error Pin
ursus zeta14-Apr-05 10:29
ursus zeta14-Apr-05 10:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.