ms-office

Office (esp. Outlook) addins

We want to develop addins for outlook, word and excel. As of now I am aware of 2 types of solutions. One to go for Shared Add-in (COM based) and other to build VSTO based Add-in. As I am new to this, which would be the better option? (Or if there is 3rd way,please let me know) We are targeting Office 2003 and 2007 both. And I would prefe...

Programatically converting from MS word to Excel

Is there anyway to problematically take a MS Word file and convert to excel. (Obviously, word would to guess where to put stuff). Any language would be fine ...

Will upgrading Office from 2003 to 2007 break VB programs which use Excel through the COM interop?

Assume all traces of Office 2003 will be removed from the computer. UPDATE: I understand that I will still be able to use .xls files. I'm asking about automating Excel through the COM interop from outside Excel. When I add a reference to Excel to a VB project, it gives me a different version of the dll for different versions of Excel. ...

How to use COM in VBA for Word?

I am working with VBA, in Microsoft Office 2007 and 2003 (Word specifically). What I need is to use a custom COM object from VBA and use its methods. I already do it in Word 2007 but it crashed in Word 2003. This is the command that I am using: Dim oCOM as Object. Set oCOM = CreateObject("COMDLL.COMObj") I got this error:...

how to get the MS word screen position from the Ribbon control?

I want to get the word position, so that I can position my dialogs relative to the word on the screen in the event handler in the ribbon control private void button1_Click(object sender, RibbonControlEventArgs e) How to get that? I mean there is no location or Point property which tells the screen coordinates. ...

Format of Time registry value in HKCU\Software\Microsoft\Office\Common\Offline\Files entries

What is the information in the Time registry value in the entries in HKEY_CURRENT_USER\Software\Microsoft\Office\Common\Offline\Files? I see (example):0x01c99b84|0x11990880 I'm pretty sure that the first "half" (prior to the bar character) is the file modified time (probably in File Time format. I'm not sure what the 2nd "half" of the...

How to compare fields with 'Memo' datatype in vba?

The MS access database does not allow comparing fields with 'memo' datatypes in SQL query. Is there a way to do it in VBA? Simple comparison does not work if the size of memo>255 characters ...

How do I save preferences for my VSTO plugin?

I've written a VSTO plugin for MS Project 2007 which basically just publishes Project data to our Sharepoint portal. To do this, the user has to enter in the sharepoint site name into our plugin everytime that they want to publish. How do I persist this information so that the user only has to enter the information once? Ideally, I'd ...

Close MS Office C# Console

Hey Everyone.. I'm writing an automated test to determine whether or not rtf files are successfully opened by MS Word. So far I looping through all the rtfs within a given directory and opening them. Later I will have to catch exceptions to generate a report (log the file name that crashed word). I am processing a large number of files...

How to programatically re-enable documents in the MS Office list of disabled files

MS Office programs keep a list of disabled files that have caused errors when previously opened. A user can remove documents from this list by accessing the list through the program menu and selecting a document to be re-enabled. (http://support.microsoft.com/kb/286017) The question is: How can this re-enabling of documents be accompl...

Open Word Documents using Interop DLL without opening Word?

Hello Everyone, I have written an automated test which loops through a large volume of Word Documents and opens them individually in a single Word instance. My question is.. can I perform the OpenDocument() without an ApplicationClass instance? What I would like to do is run my test without having a visible instance of Word open. Possi...

Textbox in custom toolbar.

Is it possible to put textbox control in custom toolbar in Excel. I have created an Add-in that shows this toolbar. What I want to do is when user types in textbox Add-in should call a procedure or function depending what user has typed. I would like to do it in VBA in MS Excel. Thanks. ...

Storing arbitrary meta-data in Microsoft Word document

I need to store custom meta-data in a Word document. The 'document properties' are limited to 255 bytes but I have data which is >> 10k We are using VBA to write a word extension to interact with our application and want to have our application data stored in the word document. The idea is that that the user can share just the word docu...

Interop with Office 2003 and 2007

I would like to have my application function with both version of Office (as well as Outlook within those). I understand I can't install them full in parallel (Outlook being the fight really). In specific, our application opens up Outlook, fills some information and loads up the contacts (so they can select who to send it to), and some ...

WinForm application and MS Office references

In our WinForms project, we need to give a facility to import data from Excel sheets. There are ways to refer MS Office files (here Office 2003) in your project references. Each time there is slight difference in build environment the project reference breaks and shows an Excel missing error. My question is How to correctly refer O...

How do I insert a SQL Server result multiple times in a live word document using VB

Ok, I'm stuck trying to figure out how to take a mail merge, use that info to make MS SQL calls and get strings back in a word document. I'm guessing VB but I have no VB experience. ...

Is a Microsoft Office license required to view Excel files?

We currently generate reports in MS Excel format. Our client just called to ask if we could generate those reports in OpenOffice format instead. Their reason is that their entire office is being purged of Microsoft Office, as their license has expired, and they are no longer willing to renew their license. As a consequence, they want ...

Version Control for Access VBA code ?

Does any kind of version control exist? If no, is there any good solution for collective development of MS Access 2007 database with VBA ? ...

How to keep Excel interop from stealing focus while inserting images

I'm using the Excel COM interop to insert images (specifically EPS) into a spreadsheet. The images are inserted fine, but Excel ignores all the visible/background settings and steals the focus the display a dialog box saying something like "importing image". The dialog box only stays a fraction of a section, but it makes the screen fli...

Office 2007/2003 VSTO Shared Add-In Design Query

I am designing a shared add-in using VB.Net 2008 and VSTO that has to fire up when any MS Office App is started. It has to work for both 2002, 2003 and 2007 applications. I have managed to put together a working add-in that pops up a test message stating the version of Office and the Application name and tested this across all the apps o...