office

How do I find IIDs for Office outgoing COM interfaces in C++ without MFC or ATL?

I am writing an application that needs to handle events fired by Office - things like 'before print' or 'new file'. From various articles and examples I understand I should use the IConnectionPoint interfaces. I got the ConnectionPointContainer for Word.Application using QueryInterface. Now I want to run FindConnectionPoint, but I have ...

Open pptx in PowerPoint 2010

I try to open pptx file in PowerPoint 2010 programaticaly from Ruby using win32ole @power_point = WIN32OLE.new('PowerPoint.Application') @power_point.Visible = true @power_point.DisplayAlerts = 1 # ppAlertsNone @power_point.FileValidation = 1 # msoFileValidationSkip @doc = @power_point.Presentations.Open(win_path(path), 0, 0, 0) @doc.Up...

Is it a good idea to install Office 2007 on a server?

I noticed a lot of 3rd party SharePoint applications require that Office be installed on the server in order to function - PDF converters, for example. To me, this seems like a horrible idea. The overhead, update requirements, reboots, and footprint all combine to make this a bad idea. Am I wrong in my assumption? ...

retrieve single cell value in Excel automation function with c#

i need to retrieve a single cell instead of Excel.Range in my method. using Excel = Microsoft.Office.Interop.Excel; ... public object vReadNumber(Excel.Range targetRange) { ... Doing Something With targetRange ... } any idea? ...

Using 32bit COM addin under MS Office 64 bit

Hi, I am struggling to apply an existing 32bit COM addin to 64bit Microsoft Word 2010. To make the addin visible to Word, I have used the dllsurrogate-method, as it described here. The problem is that now addin caused some strange exception when tries to add its toolbar and menu to office's. I cannot figure out, what it is, it seems, ...

Read Macros from External File quickly

Here is my code, For Each pj In wdApp.Application.VBE.VBProjects x = pj.FileName y = pj.Protection If x <> "" Then If y <> "1" Then For Each vbcomp In pj.VBComponents For i = 1 To vbcomp.CodeModule.CountOfLines newMacro = vbcomp.CodeModule.ProcOfLine(Lin...

cannot launch Visio 2010 application from Sharepoint 2010 featureactivated code

Dear members ! Require Your Assistance whith following issue : I am developing Sharepoint feature which should launch Visio 2010 application. Sharepoint is 2010 , OS is Windows 2008 R2 this line of code app = new Application(); raise error System.UnauthorizedAccessException {"Retrieving the COM class factory for component with CLSID {0...

How to listen to COM events from Office applications that were started independently?

What I want to do: Write an application that listens to Office events. I want to listen to events from any instance opened on the machine. E.g. if I'm listening to BeforeDocumentSave in Word, then I want my sink for this method to be activated whenever any instance of Word on the host saves a document. Another requirement is that I'm...

Preview Outlook messages in .NET application

Is there a component to allow us previewing Outlook email messages in a custom .NET application? ...

ASP.NET App Exports to Excel (or not in this case)

Hi All, Exising .net 2 app migrated to .net 4 and moved to an IIS7 Windows 2008 R2 server. We used to be able to run some code on the web page to export some stuff to excel. Now, when we do... we get the following error: The machine-default permission settings do not grant Local Activation permission for the COM Server application wi...