ms-office

Outlook Interop: How to iterate over all items in folder

I would like to search the bodies of all outlook items. I know how to do this for the four PIM items (Notes/Tasks/Appointments/Contacts). But the code is identical for all of them with the exception of casting the COM object to the specific item type (i.e., ContactItem, AppointmentItem, etc). Is there a parent class for these PIM items...

VBA tutorial

Hi, At work I need to do lot of stuff with MS-Office and I managed to 'write' some scripts that do stuff instead of me. I copy-pasted it, changed some strings maybe. It is very frustrating to just copy paste and not understand how to do it your self, for every simple thing google for something. I am not completly new to programming, jus...

Ribbon instances per Document

I am using VSTO 3.0 and the ribbon designer gives me a ribbon that is apparently shared across documents. So if I have Document specific state( number of XML marked up tags say) that needs to show up in the ribbon( or a toggle button ) then all documents seem to share the ribbon instance How can I fix this TIA ...

Open source library to convert DOC and other MS-Office files to image(s)

Can you recommend an open source library (C or C++) to convert MS Office files into a set of images? I am evaluating ImageMagick and while it does support PDF files, it does not work with MS Office files. ...

How to place text in the clipboard so that it pastes as a table in Word?

Using VBA in MS Office, how do I add text to the Windows clipboard so that it will paste into Word as a table? ...

Install custom Outlook 2003 form in users Personal Form Library

We've developed a custom Outlook 2003 form based on ipmNote. I need a way to push this to all the other users in the organization. At the same time we'll also be installing a custon Add-in built with VSTO so we could do the form install as part of that. Currently I can't use the Organizational Forms Library, because the exchange admins...

WPF Office 2007 Theme

are there any additional WPF themes from microsoft except that default ones provided in PersentationFrameWork.Aero, PersentationFrameWork.Luna, PersentationFrameWork.Royale & PersentationFrameWork.Classic i am specially interested in a Office 2007 Blue theme ...

How to fill DataTable from an in-memory Excel Worksheet

Our client gets Excel files in Excel's HTML format.(That's the way it arrives; nobody has any control over that.) We then need to run a report based on the data in the file. Using ADO.NET (OleDbReader) results in a "External file not in expected format" exception. If the data is converted to regular Excel format it gets read in OK. Howe...

How do I call a VSTO function from a formula in excel?

I'd like to be able to call a function exposed by a VSTO addin from a cell in an excel worksheet. More specifically, if I have a VSTO function Foo() that returns "bar" I'd like to be able to write =Foo() in A1 which evaluates to "bar" on calculation. Is this possible? What are the key steps I'd need to take? The prospect of being able ...

how do i get a count of columns that contain data from excel

I'm wondering if there is a simple property in the Excel interop that returns the count of used columns--ones containing data--from a given worksheet. In example: If myWorksheet.Columns.Count returns the total number of columns in a given worksheet, is there no equivalent along the lines of: myWorksheet.Columns.UsedCount? I'm not sure ...

How go I get a reference to a cell in an array knowing only its value?

I have a column array with the following values in my sheet: 11, 15, 5, 7, 2. I want to get a reference to the cell which contains the value 15. How would I go about doing this? Thanks ...

VS 2008 Open Word Document - Memory Error

I am executing the following code that worked fine in a vs2003(1.1) but seems to have decided otherwise now that I'm using vs2008(2.0/3.5): Dim wordApp As Microsoft.Office.Interop.Word.Application Dim wordDoc As Microsoft.Office.Interop.Word.Document missing = System.Reflection.Missing.Value wordApp = New Microsoft.Office.Interop.Word....

How good is Apache POI word support?

On the web page, it looks like there is no current development in the old style .doc. Is it good enough to create complex documents? Can it read all .docs without crashing? What features do (not) work? I am not currently interested in the XML based formats, as I don't control the client side. The excel support seems to be much bet...

How to add a custom item to the Microsoft Office Send To Menu

Is it possible to extend the "Send to" menu in Office (not the Windows one; I know how to do that). I would like to launch my own application with the source document as the target. Update: I am looking for a non-VSTO based solution. ...

Building an OCX with VS.NET?

What happened to OCX's? Are they no longer possible to create with the latest tools? I need to create an ActiveX control that I can place in Word, PowerPoint and Excel documents. If I use VS.NET, I can only create a UserControl DLL with COM Interop, but I don't think I can add that using the "More Controls" toolbox of PowerPoint's Devel...

Making Excel macro for fast data entering ::: VBA ::: Excel :::

I have a job to enter survey results (in paper form) to excel. I've never written any macro in Office :( Here I what I basically need: I have predefined columns (|A|B|...|AG|AH|) All surveys are grouped into groups. All surveys from same group have few (like predefined) same columns. It's always same columns that 'define' group All ot...

Runtime error 1004: Application-defined or object-defined error

I've been having a major issue... well maybe not major, but I've been trying to figure this out since yesterday lunchtime. I have the following code: Application.CutCopyMode = False ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _ "Data!R7C1:R5000C40").CreatePivotTable TableDestination:= _ "'[Master-File.xls...

How do I disable ms query's auto wrapping of column aliases with quotes in excel 2007?

I'm working on a sheet that accesses a legacy data source via MS Query. I'm trying to alias some of the ridiculously ugly column names but the data source doesn't support wrapping alias names with quotes. Since excel is automatically wrapping aliases in quotes the query errors/fails. I seem to be stuck. How do I stop this default behav...

How do I call an xll addin function from vba?

I have a 3rd party XLL addin I'd like to wrap in my own custom vba function. How would I call the 3rd party function from my code? Thanks ...

How to parse word documents with ruby?

Does anyone know of a library that I can use on OS X/Linux to parse Word files and output the content as HTML? I've had a look at win32ole but as far as I can see it's for Windows only, although I could be wrong. Any suggestions? ...