Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Diasabling Macro PopUp

Hi,
I have used office automation to automate word,excel and
powerpoint.For this task, i have to disable warning that pop ups when
opening files that contains macros.

I tried by setting AutomationSecurity to
msoAutomationSecurityForceDisable but it does not works.

Can any one please suggest me other ways to completely disable these
warnings during

office automation process using C#?

Regards
Prafulla
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Diasabling Macro PopUp

You need to set that same setting to

Application.AutomationSecurity =msoAutomationSecurityLow

As I'm sure you've noticed, ForceDisable stopped execution.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"prafulla" wrote:

Hi,
I have used office automation to automate word,excel and
powerpoint.For this task, i have to disable warning that pop ups when
opening files that contains macros.

I tried by setting AutomationSecurity to
msoAutomationSecurityForceDisable but it does not works.

Can any one please suggest me other ways to completely disable these
warnings during

office automation process using C#?

Regards
Prafulla

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Diasabling Macro PopUp

Hi,
Actually I tried by setting pplication.AutomationSecurity
=msoAutomationSecurityLow and msoAutomationSecurityForceDisable.But
it still does not works.

The warning still pop ups while opening the office file(word,excel and
power point) and stops the execution flow of the program.

I want these warning dialog to be suppressed such that that normal
flow of the program is not hindered.

Thank you.

Regards,
Prafulla
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Diasabling Macro PopUp

Here is code I use in an application I run almost daily with no issues.

Application.AutomationSecurity = msoAutomationSecurityLow
On Error Resume Next
Set oWB = Workbooks.Open(newPath, UpdateLinks:=False, _
ReadOnly:=True)
On Error GoTo 0
Application.AutomationSecurity = msoAutomationSecurityByUI

Are you doing things in Excel and another application and it shows up?
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"prafulla" wrote:

Hi,
Actually I tried by setting pplication.AutomationSecurity
=msoAutomationSecurityLow and msoAutomationSecurityForceDisable.But
it still does not works.

The warning still pop ups while opening the office file(word,excel and
power point) and stops the execution flow of the program.

I want these warning dialog to be suppressed such that that normal
flow of the program is not hindered.

Thank you.

Regards,
Prafulla

  #5   Report Post  
Posted to microsoft.public.excel.programming
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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Diasabling Macro PopUp


Hi,
I have used c# for office automation.My code goes as follows:

Microsoft.Office.Interop.Word.ApplicationClass appWord = new
Microsoft.Office.Interop.Word.ApplicationClass();
appWord.AutomationSecurity
=Microsoft.Office.Core.MsoAutomationSecurity.msoAu tomationSecurityLow;
doc = appWord.Documents.Open(...)-----------In this code the diaolog
box popups and code halts.
appWord.AutomationSecurity =
Microsoft.Office.Core.MsoAutomationSecurity.msoAut omationSecurityByUI
..............

Further, i have to deal with all three types of the document files
doc,xls and ppt.They can appear as a single document or as an embedded
document(a word file can appear embedded inside doc,xls or ppt or any
other document like ppt).

As, i already have mentioned, please suggest me how can i suppress
the dialog box so that the execution flow of the program does not
halts at the mentioned line.Thank you.

Regards,
Prafulla
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup macro puiuluipui Excel Discussion (Misc queries) 12 October 6th 09 07:38 PM
Popup in excel macro Hassan Excel Programming 3 July 24th 08 04:59 PM
Macro Properties Password Popup. SunRace Excel Programming 1 January 29th 08 10:16 AM
Add a warning popup to a Macro Button Teresa Excel Worksheet Functions 4 January 16th 06 09:27 PM
How do i create a popup window (a macro ?) Susanne Excel Programming 3 April 15th 05 02:16 PM


All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"