PC Review


Reply
Thread Tools Rate Thread

Diasabling Macro PopUp

 
 
prafulla
Guest
Posts: n/a
 
      23rd Oct 2008
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
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      23rd Oct 2008
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
>

 
Reply With Quote
 
prafulla
Guest
Posts: n/a
 
      24th Oct 2008
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
 
Reply With Quote
 
Barb Reinhardt
Guest
Posts: n/a
 
      24th Oct 2008
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
>

 
Reply With Quote
 
prafulla
Guest
Posts: n/a
 
      26th Oct 2008
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.msoAutomationSecurityLow;
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
 
Reply With Quote
 
prafulla
Guest
Posts: n/a
 
      27th Oct 2008

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.msoAutomationSecurityLow;
doc = appWord.Documents.Open(...)----------->In this code the diaolog
box popups and code halts.
appWord.AutomationSecurity =
Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityByUI
..............

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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popup macro puiuluipui Microsoft Excel Misc 12 6th Oct 2009 07:38 PM
Diasabling Automatic Updates E Windows XP Help 3 10th Jan 2008 06:06 PM
macro popup box Gary Microsoft Excel Discussion 1 5th Jul 2007 04:13 PM
WIndows 2003 auto login diasabling =?Utf-8?B?S2FydGhpaw==?= Microsoft Windows 2000 Security 2 14th Dec 2004 05:11 AM
Popup with Macro box =?Utf-8?B?TWFoZXNoIERldmFuaQ==?= Microsoft Access VBA Modules 0 9th Feb 2004 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:06 AM.