pia

Release COM Components

Is it really necessary to release COM components from Office PIA, when you don't need them anymore by invoking Marshal.ReleaseComObject(..)? I found various and contradictory advices on this topic on the web. In my opinion, since Outlook PIA is always returning a new references to its interfaces as returning values from its methods, it ...

Extracting Source Code from an MS Access DB

Hi, I have an Access DB that I would like to extract the source code from so I can put it into Source control. I have tried to extract the data using the Primary Interop Assemblies(PIA), but I am getting issues as it is not picking up all of the modules and forms. There are 140 Forms and Modules in the code(Don't ask, it's a legacy ...

Help with using TypeConverters for enums in an Excel PIA assembly

I would like to use a TypeCoverter to regionalise output for enums in an assembly that is a PIA loaded into Excel. I can run this and it works on an assembly in a test project I created with an explicitly referenceed assembly, however when running a project that has been built as an Excel PIA. If I try: _ public enum MyEnum ItemA ...

Automating Excel using ASP.NET

Background We are developing some in-house utilities using ASP.NET 2.0. One of which is extracting some information from databases and building an Excel workbook containing a number of spreadsheets with data based on queries into the database. Problem The proof-of-concept prototype (a simple ASP.NET page that queries a single item fro...

C# interop: excel process not exiting after adding new worksheet to existing file

I've read many of the other threads here about managing COM references while using the .Net-Excel interop to make sure the Excel process exits correctly upon exit, and so far the techniques have been working very well, but I recently came across a problem when adding new worksheets to an existing workbook file. The code below leaves a z...

Is Office 2007 PIA deployment possible without Office 2007?

Does Office 2007 PIA also require Office 2007 to be installed? Can I deploy Office 2007 PIA with VSTO 3.0 (without having Office 2007 installed)? EDIT: I have a windows application that generates MS Word files. I have added the Office 2007 PIA as custom pre-requisite in the setup, but Office 2007 PIA needs MS Office 2007 to be installed...

Can you install Office 2007 PIA's without office

First of all, my question is not quite the same as http://stackoverflow.com/questions/370407/is-office-2007-pia-deployment-possible-without-office-2007 I am not looking to use the PIA's yet. The IT engineers would ideally like to deploy the 2007 PIA's to everyone's computers before they upgrade Office 2007. This way there is fewer thi...

Can Visual Studio 2008 Reference 1.0 Assemblies?

I've got an older assembly (Office XP PIA) that appears to target the .NET 1.0 framework. The assembly has been registered and is visible in the GAC (as well as the Win32 registry), but it doesn't appear in Visual Studio 2008 when I choose "Add Reference". Does Visual Studio support referencing older assemblies? ...

VS 2005 against Office XP PIA on system with Office 2003/2007?

On my development system, I am running Office 2007, and previously had Office 2003 installed, and thus have the Microsoft Office 11.0 and 12.0 Object Models available. Our production environment is in the process of being upgraded to Office 2007, but it hasn't happened yet - still running Office XP in production, and I need to be able t...

is it possible to insert microsoft word document editor to own application using PIA

How to use Office Primary Interop assembly in own application like Business in the box. Is it possible? ...

MS Office PIAs "backward compatability"

Hi there, I just wanted to know something. I've successfully completed a WinForms app with MS Word integration - the app writes to mergefields in a Word Template. I did the template using MS Word 2007, but saved it in compatible mode as a 97-2003 '.dot' file. Due to the fact that I have Office 2007 installed, I'm using version 12.0 of...

Office Primary Interop Assemblies not working after installing 2007 compatibility pack

I had a C# program that did some Word & Excel automation and it used Office 2003 Primary Interop Assemblies. The way I deployed it was by including the Interops in the bin and I had my program reference it from there as opposed to referencing it from the GAC (not very professional, but it worked fpr years). Recently on 3 machines the off...

Insert text into table in Microsoft Word (C++, Visual Studio 2005)

Hello. I've managed to figure out how to create a Word document using PIA and C++ in Visual Studio. But I can't figure out how to write text to the table cells. I would appreciate any help. Thanks EDIT: Thanks for your comments. I've finally managed to figure it out: I can loop through the cells in the table, select the cells with Cell...

How to check whether Primary Interop Assemblies are installed or not?

Hi, I am "using" Microsoft.Office.Interop.Excel in my C# code. I want to use the code related to Microsoft.Office.Interop.Excel only if PIA for Excel is installed on that machine. But, I get exception when I call that function (which uses Excel Interoperability) Why am I getting exception even if that code actually isnt getting calle...

Office PIA and .net framework version compatibility

Hi, I use Office Primary Interop Assemblies for Office 2003 and 2007. On download page of PIA, it is mentioned that .net framework 1.1 is required. I want to know if the requirement of version 1.1 - is it minimum version that is required? Or is it strict requirement. In other words, If I have .net version 2.0 or 3 or 3.5 and dont hav...

Office 2003 PIAs with Office 2007

Is it possible to target Outlook 2003 in a vb.net 2008 Windows application when working on a system that only has Office 2007 installed on it? I downloaded the 2003 PIAs, but they wont install without Office 2003 installed first. The point is, I don't want Office 2003 installed on my development machine. Thanks ...

Changing Color of Individual Bars in Microsoft.Interop.Graph.Chart .NET?

Can anyone help me out how I can change the individual color of each series bar using Microsoft Graph PIA in C#? I have tried multiple ways but nothing works. There is this ChartFormatFill object inside the Series object but it is read only and doesnt allow me to change the color of the bars. I have also tried recording a macro and the...

Only number in Excel cell by programming C#

Hello, I generate some Excel file from an .NET C# application. I use PIA 2002. I can password protect, do a freeze pane, change the color of the cells .... one thing I can't do. I'd like to allow for a specific range, the use can enter ONLY a number..... How can I do this ? Thanks, ...

Visual Studio 2010: Embed Interop Types

I found some information about this on Scott Hanselmans Blog Does anybody exactly know what this mean? Is this only for the Office Primary Interop Assemblies, or can I also use this to Embed my Redemption library or other COM libraries? Kind regards ...

.NET application with Office PIA and SecurityException

I have a c# application that uses the Office PIAs to enable the application to export data to an Excel file. This works great on my development machine and other desktop machines. When I run the application on a Terminal Server (which has Office available) I get a SecurityException and the application crashes. The debugger recommends ...