View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
prafulla prafulla is offline
external usenet poster
 
Posts: 4
Default Diasabling Macro PopUp

Hi,

I have used c# for may office automation task.My code goes as
follows.

Microsoft.Office.Interop.Word.ApplicationClass appWord = new
Microsoft.Office.Interop.Word.ApplicationClass();
appWord.AutomationSecurity =
Microsoft.Office.Core.MsoAutomationSecurity.msoAut omationSecurityLow;
doc = app.Documents.Open(...) -----The dialog box appears here
and execution halts.
app.AutomationSecurity =
MsoAutomationSecurity.rchmsoAutomationSecurityByUI ;
..............

Further, i have to deal this problem in doc, xls and ppt files and
these files that contain macro may appear as an individual file or as
an embedded file inside other files(including doc,ppt, xls or other
documents).

Please, suggest me a solution to suppress the dialog box so that the
execution of the program does not halts when opening the file that
contains macro(s).

Regards,
Prafulla