Click here to Skip to main content
16,010,523 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to access a class of a file A.cs from other file B.cs Pin
pramod.hegde23-Aug-12 23:51
professionalpramod.hegde23-Aug-12 23:51 
GeneralRe: how to access a class of a file A.cs from other file B.cs Pin
Pete O'Hanlon24-Aug-12 0:04
mvePete O'Hanlon24-Aug-12 0:04 
GeneralRe: how to access a class of a file A.cs from other file B.cs Pin
jamesfrj24-Aug-12 4:44
jamesfrj24-Aug-12 4:44 
AnswerRe: how to access a class of a file A.cs from other file B.cs Pin
Bernhard Hiller23-Aug-12 22:51
Bernhard Hiller23-Aug-12 22:51 
GeneralRe: how to access a class of a file A.cs from other file B.cs Pin
jamesfrj30-Aug-12 0:30
jamesfrj30-Aug-12 0:30 
AnswerRe: how to access a class of a file A.cs from other file B.cs Pin
BobJanova23-Aug-12 22:54
BobJanova23-Aug-12 22:54 
GeneralRe: how to access a class of a file A.cs from other file B.cs Pin
jamesfrj30-Aug-12 0:22
jamesfrj30-Aug-12 0:22 
GeneralHow do I programmatically disable macros in Microsoft Project files using C#? Pin
Kosh201023-Aug-12 10:04
Kosh201023-Aug-12 10:04 
In SQL Server Integration Services (2008) I have a created a task script using C# that converts Microsoft Project (2010) MPP files to an ASCII text CSV format. The problem I have encountered is that because some of the files still have their macros enabled, the process stops and presents a window asking whether to "Enable" or "Disable" the file's macros. Because multiple files are being automatically processed, I need to set in the C# code a default of disabling all macros.

Does anybody know how to do this?

I tried the following, but couldn't get it to work because it would not recognize the "AutomationSecurity" item under Application. It returns the message: 'System.Windows.Forms.Application' does not contain a definition for 'AutomationSecurity'.

Application.AutomationSecurity = Microsoft.Office.Core.MsoAutomationSecurity.msoAutomationSecurityForceDisable;

Here are the references being applied at the top of the class file.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using Microsoft.Office.Core;
using MSProject = Microsoft.Office.Interop.MSProject;



Thanks.
The science of business is the science of service, to this end it is better to do more than you promise than to promise more than you do.


modified 23-Aug-12 17:37pm.

GeneralRe: How do I programmatically disable macros in Microsoft Project files using C#? Pin
BobJanova23-Aug-12 22:50
BobJanova23-Aug-12 22:50 
AnswerRe: How do I programmatically disable macros in Microsoft Project files using C#? Pin
Kosh201024-Aug-12 10:31
Kosh201024-Aug-12 10:31 
QuestionActive Directory Pin
mamoony23-Aug-12 7:49
mamoony23-Aug-12 7:49 
AnswerRe: Active Directory Pin
fjdiewornncalwe23-Aug-12 8:06
professionalfjdiewornncalwe23-Aug-12 8:06 
GeneralRe: Active Directory Pin
mamoony23-Aug-12 8:32
mamoony23-Aug-12 8:32 
GeneralRe: Active Directory Pin
fjdiewornncalwe23-Aug-12 8:42
professionalfjdiewornncalwe23-Aug-12 8:42 
GeneralRe: Active Directory Pin
mamoony23-Aug-12 8:46
mamoony23-Aug-12 8:46 
GeneralRe: Active Directory Pin
fjdiewornncalwe23-Aug-12 8:52
professionalfjdiewornncalwe23-Aug-12 8:52 
GeneralRe: Active Directory Pin
mamoony23-Aug-12 9:13
mamoony23-Aug-12 9:13 
GeneralRe: Active Directory Pin
mamoony23-Aug-12 8:48
mamoony23-Aug-12 8:48 
GeneralRe: Active Directory Pin
fjdiewornncalwe23-Aug-12 8:52
professionalfjdiewornncalwe23-Aug-12 8:52 
QuestionI want to Learn How to make Electronic Gadgets Pin
Varinder Raii23-Aug-12 3:24
Varinder Raii23-Aug-12 3:24 
AnswerRe: I want to Learn How to make Electronic Gadgets Pin
Wes Aday23-Aug-12 3:35
professionalWes Aday23-Aug-12 3:35 
AnswerRe: I want to Learn How to make Electronic Gadgets Pin
BobJanova23-Aug-12 3:38
BobJanova23-Aug-12 3:38 
GeneralRe: I want to Learn How to make Electronic Gadgets Pin
Wes Aday23-Aug-12 3:54
professionalWes Aday23-Aug-12 3:54 
GeneralRe: I want to Learn How to make Electronic Gadgets Pin
BobJanova23-Aug-12 5:08
BobJanova23-Aug-12 5:08 
GeneralRe: I want to Learn How to make Electronic Gadgets Pin
Wes Aday23-Aug-12 5:22
professionalWes Aday23-Aug-12 5:22 

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.