office

VSTO install package How to check for prerequisites and skip them

I created Setup project for my Excel add-in project according to the article: Deploying a Visual Studio Tools for the Office System 3.0 Solution for the 2007 Microsoft Office System Using Windows Installer http://msdn.microsoft.com/en-us/library/cc563937(office.12).aspx I add prerequisites such as 2007 Interop assemblies(Office2007PIA...

How to use Excel file from visual studio project resource

Hi, I add an excel file to my project resource, and I would like to open it, but method woorkobook.open() take only path string as parameter :-( What is the proper way to open and use those excel files from resource? ...

Get current Cursor Position in Word (VSTO)

Is there a way for a Word Add-In to get the current cursor position within the document/on screen (e.g. to display my own control next to it)? ...

Rate My Script: Finding Flash Files Embedded in Office Files

Can anyone improve on this? Requires Sysinternals Strings date /T >N:\output.txt net use z: /delete net use z: \\svr-002\rmstudentwork @cd /d "z:\" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.xls | findstr \.swf >> "N:\output.txt" "N:\Scripts and Reg Frags\FindEmbededFlashFiles\strings.exe" -s *.ppt | findstr \.swf...

Access RichTextContentControl Text from an AddIn in MS Word using C#

I've created an AddIn for MS Word. There's a new tab and a button. I've added a new template document that has a RichTextContentControl in it. WORD_APP = Globals.ThisAddIn.Application; object oMissing = System.Reflection.Missing.Value; object oTemplate = "E:\\Sandbox\\TemplateWithFields\\TemplateWithFields\\Tem...

Problem with Outlook.Explorer.SelectionChange event

I attach to Outlook.Explorer.SelectionChange event. Event handler makes a call to an assembly that retrieves some data from web services. After one call to that assembly my event handler is no longer called when SelectionChange occurs. Any ideas? This seems to be somehow related to the assembly itself, not what it is doing. Simply cre...

MS Word - Work with two VBEs at once

I've just taken over maintenance of some pretty scary legacy vba at work. When I have spare time I'm essentially restructuring and rewriting it in new templates. Every now and then, I've managed to exploit a glitch of sorts and have two different instances of the VBE open at once. I don't know exactly what I did to make this happen, but ...

iPad (iOS4) - Opening word document using UIWebview

Error I get from console: 2010-07-02 12:08:17.179 myApp[15509:6507] Cannot find data converter callback for uti public.data 2010-07-02 12:08:17.182 myApp[15509:6507] Failed to generate preview iPhone simulator work fine without any problem but iPad doesn't. That's strange. Thanks for helping me. Tung Do ...

Ultra Office component

Does anyone have any experience with this component ? ( http://www.ultrashareware.com/Ultra-Office-Control.htm ) I am using it to integrate Excel in a desktop app. It's pretty good and straightfoward but it has one major issue and one minor issue. THe major issue is that it does not seem to close the "Excel" files correctly ( so when I...

Find Outlook Contacts from code where FullNAme like "Name"

Writing Outlook 2010 AddIn in c# How to find contacts where for example FullName like "Name" First I tried string filter = "[FullName] = 'Name'"; and it works fine but only for the Name, but now I need to find contacts where FullName can be JonName or Peter Pen or ... As I uinderstood I should use spacial query string in filter, b...

How do I create an MS Word add-on that automatically recommends terms by detecting what user is typing (muti-word matching)?

I am aware of auto-complete and custom dictionary, but my application requires matching multiple, unspecified number of words or acronyms. I want to suggest to user a standard way of writing a particular term by detecting what she means. Kind of like when you are typing a date and word suggests the standard format. ...

Misspellings in Microsoft Word

I am working with misspellings in Microsoft Word. With only just a few misspellings, accessing the SpellingErrors collection becomes gawdawful slow (at least with For/Next or For/Each loops). Is there a way to get the to the list (make a copy, copy the entries, stop the dynamic nature of the collection) quickly? I just need a list, a sn...

Wix: How to define conditional bootstrapper pre-requisites?

I am using WIX 3.0 Toolset and VS2008. In my ".wixproj" file I have added the following code (which works fine). I want to add a condition so that it will only install PIA if office 2007 is installed. ... <ItemGroup> <BootstrapperFile Include="Microsoft.Net.Framework.3.5"> <ProductName>.NET Framework 3.5</ProductNa...

office 2007/2010 VSTO add column

Hi, How do I go about adding a column (Custom Property) to all the messages in outlook. I wish to add a custom property to each email message. I need to allow the user to switch the property on and off. I have created a new add-in but cannot find a sample or similar functionality anywhere. If I can understand how to add the property a...

Event on named range creation in Excel using VSTO

Is there any way to hook into the creation of a named range or list object in Excel 2007 using VSTO? I need to track the named ranges in a worksheet and, as such, need to be alerted when a new one is created. I have tried the SheetChange and SheetCalculate events and neither is triggered on the creation of a new named range. ...

Word 2003: Form elements - limit keyboard input to 0-9 only?

When using a date field or number field on a Word form, how can you limit keyboard input to numbers only? Setting the properties of to Date and setting a format (ie. dd-mm-yyyy) does not prevent users from using any other keys than numbers for this field. Even though the document will report an 'invalid date' when leaving the field, I wo...

How to open a new Live Meeting window programmatically

Hi, I am currently engaged in developing a add-in for MS outlook 2007. I need to open a new Live meeting(conferencing request) window programmatically. This is exactly same as the action performed when the new-> Live meeting button is clicked. Is there any possibility to fire the click event of the "Live Meeting" command bar button? Ple...

Hide/unhide ribbon for Microsoft RIbbon for WPF release

MS officially released MS Ribbon for WPF. This release doesn't support theming, it comes with a default blue theme, Office 2010 look&feel. Office 2010 has a button that allows users to hide/unhide the ribbon, but the released version of ribbon doesn't has one. Is it implemented ? How can I add one? Thanks, Tudor ...

Visual Basic 6 - Office Setup Configuration HELP

hi! i need help to fix my visual basic 6.0. When vb6 start ups, It shows some Microsoft Offices Setup configuration that shows at everytime. If i cancel, I can continue the VB6, But some of component always shows this installation setup again. When I restart the VB Program, The setup configuration also shows everytime... Any ideas to fi...

Office Custom CommandBar events not firing when toolbar is truncated.

Have built a toolbar for office xp, added buttons, wired up events and everything works fine. The problem is when I resize the Excel window so that the custom toolbar is truncated (and the truncated buttons appear into the double arrow dropdown), none of the buttons or drowdowns that are in the truncated dropdown fire. If I expand the ...