ms-office

Recover URL from MS Word fields showing "Error! Hyperlink reference not valid"

I have some word documents that have place holder URL's in them. The URL's are something like "http://<URL>/service.svc". Word has figured that these have to be a valid URL and when the fields get updated, replace them with "Error! Hyperlink reference not valid". When I mouse over that error text, word pop's up a tooltip still sho...

Excel Interop Conditional Formatting

I've just spotted the following page: Setting Conditional Formatting in Excel 2007 which is very similar to something I'd like to do, but I can't seem to find appropriate functions to do something slightly different. I'm wondering if anyone knows a way to apply conditional formatting to a range, based upon a set of textual values. E.g. ...

How to determine the date that Office 2003 was installed

Is there any guaranteed way of determining the date that Office 2003 (and .Net Framework v2.0) were installed on a client computer? I am trying to nail down a problem which I think is due to the order that the .Net Framework and Office 2003 were installed in, so I need a way I can get a client to have a look at their machine (preferably...

How do I terminate WINWORD.EXE when used by classic ASP?

I have a user who has to use Microsoft Word 2007 to create and manipulate word documents in his ASP web application. I'm well aware of the 'Considerations for server-side Automation of Office' KB article and the many third party components available to do this kind of thing, but they've gone a fair bit down this road already. The proble...

Run-time error '70': Permission denied

I have Windows Vista Home Premium and Microsoft Office 2000. When I run in Excel (Microsoft Visual Basic 6.0): Sub test() SendKeys "" End Sub I get error message "Run-time error '70': Permission denied". I am owner those folder and file! What can I do? Thanks!!! ...

How Do I 'Restore' MS Word's Document Window Using Automation

I would like to be able to 'restore' MS Word's document window using Automation. I already have the application object and I have tried calling App.Activate. Activate will bring the window to the top of the Window stack but not if Word is minimized. I can set the WindowState to Maximized, Minimized and Normal but what I really need to d...

Excel Upload to database table

I'm looking for the best solution to allow our users to upload XLS spreadsheet so that they can be used to populate tables in our data warehouse (DW). Our users are heavy Business Object (BO) users, and BO lets you export to XLS. When they have data in a spreadsheet that needs to be loaded to the DW, they need a process to upload the d...

Can I add a custom "Send" button to Outlook?

I'm creating a secure message alternative to email for my organization. We exchange confidential patient information with outside treatment providers. To protect privacy, we cannot use email for this purpose. Rather than force the users here to use whole new inbox, outbox, and authoring interfaces in addition to the Outlook/Exchange e...

range : apply formatting to a sub section in the range.

I'm writing a piece of code in c# to generate a report in microsft word document. I have a table of wid 2 columns. I select the 2nd column by oMainTable.Cell(currentRowNumber, 2).Range Every time I have to write something in that cell I use the above code with the combination of the Text property ,InsertParagraph(),InsertAfter() etc ...

Automating Office via Windows Service on Server 2008

We have a Windows Service which runs on 2003 Server. It opens a source Word document using the Word Interop and then does some stuff with it. It also does likewise with Excel and PowerPoint files. Recently we've tried moving this service onto a Windows 2008 Server machine and are having real problems with it. COMException at Microso...

How to extract text from MS office documents in C#

I was trying to extract a text(string) from MS Word (.doc, .docx), Excel and Powerpoint using C#. Where can i find a free and simple .Net library to read MS Office documents? I tried to use NPOI but i didn't get a sample about how to use NPOI. ...

Lock down InfoPath Templates

Does anyone know how to prevent users from editing an InfoPath form in Design mode? Users are storing InfoPath forms in SharePoint and it seems that anyone can edit the form in design mode and we need to be able to lock that down. ...

Can WPF print PDF and Office files directly?

How can I allow the user of a WPF application to print PDF, Word, Excel and Powerpoint files without opening them, i.e. show a ComboBox of all files available, user clicks on one, Print dialog opens, user clicks OK and it prints to his desired printer? ...

Is there a difference in VBA versions between office 2003 and 2007?

Can I use access 2007 VBA references with impunity (specifically, as far as the base language and old com interfaces are concerned) to develop VBA based solutions for access 2003? Or is there some new/modified syntax added to the language that i need to be aware of? Has the object model been enhanced drastically in office 2007? An...

Html To Doc(Word) Or RTF Format

Hi, What would the best possible way to convert a html page (with css, tables, images etc.) to be converted to word or rtf format. I already know about adding the content-type = application/word header and that's not an option because we need the images embedded in the document so that it can be viewed without an active internet con...

Best way to distribute Excel spreadsheet with VBA

I am trying to find out how to distribute an excel file on the net in such a way that most users will be able to use it. I am aware of the Microsoft Excel Viewer (which can open Excel files without having Office installed), but it doesn't run VBA code, which is a necessity for this file. Moreover, there are some changes to the API in O...

Parse Tab Seperated Values in VBA

I am trying to take clipboard data copied from excel (i.e. tab seperated text) and parse it into a Collection of Dictionaries. The idea is that each row will be represented by a Dictionary which maps from headers to cell values. The first row in the copied data will contain the headers. Getting the text from the clipboard is easy enoug...

Getting IE6,7,8 to reliably download office documents over ssl from our site

I have an ASP.NET web application the entire site is browsed over HTTPS using a valid commercial certificate. In one part of the application it is possible to download an Excel spreadsheet. The download is initiated from a POST (PostBack from a LinkButton) The Response is cleared (Response.Clear(), Response.BinaryWrite(bytes[])) blah et...

Tables in Excel with VSTO

Hi, I'm really new to VSTO so sorry if this is a newbie question. I'm working on a data entry application where I need to have the user get data into an excel table (e.g. when you highlight a bunch of rows and click "Format As Table"), then I need to read the data in from that table and work with it in C#. At a basic level, I've got a ...

Excel interop: _Worksheet or Worksheet?

I'm currently writing about dynamic typing, and I'm giving an example of Excel interop. I've hardly done any Office interop before, and it shows. The MSDN Office Interop tutorial for C# 4 uses the _Worksheet interface, but there's also a Worksheet interface. I've no idea what the difference is. In my absurdly simple demo app (shown belo...