word

Is it possible to load an instance of a VSTO addin from a network drive?

I've got a VSTO 3.0 Word Addin. Around here, they do all work off network drives (for backup reasons, etc etc). Anyway, when I'm in the IDE, I can run my project, it automatically starts Word, i can debug, break, etc, just fine. HOWEVER... If I compile the project, then run Word OUTSIDE of the ide, the Addin registry entry is, of cours...

How to replace and count frequency of a word or word sequence?

I need to do two things, first, find a given text which are the most used word and word sequences (limited to n). Example: Lorem *ipsum* dolor sit amet, consectetur adipiscing elit. Nunc auctor urna sed urna mattis nec interdum magna ullamcorper. Donec ut lorem eros, id rhoncus nisl. Praesent sodales lorem vitae sapien volutpat et ac...

return a list of all macros

In vba, how can i call a word document and get a list of all the macros it contains. Thanks ...

Excel export to Word (VBA): problem with loop

Hi everyone, I'm having difficulties with the following: I want to export data from an Excel Sheet to a Word document. The code for that works, but the problem is that specific blocks of code need to be repeated. And that's were it goes wrong. This is an extract of the code: Voortgang: If Controle1 = True Then ...

How to wrap words or words sequences which have not been already wrapped?

I'm trying to wrap words and words sequence from a given list with preg_replace. It almost works, but there are some use cases it doesn't and I can't figure it how. For instance I do this: // sort by descending length usort($this->_keywords, function($a,$b){return(strlen($a)<strlen($b));}); // wrapper is -%string%- fo...

problem with rows.count of a table in a word file

I opened a Word Doc,which had tables in it, use VBA from access. I want to add a new line and write something in that line. I worte some code but that code worked only in debug mode. As soon as i clear all break point and let the programm run, i will have a problem. It seems that word will only write data into the first line. Please hel...

Validating/ed events not firing in class library windows form

I'm developing a Word 2010 add in using Visual Studio 2010, and C#. I've created a simple form, with two textboxes, and an Ok button. The Ok button's Causes validation property is set to true. Both textboxes CausesValidation property is set to false, and their Validating and Validated properties are set. This is so that they are only v...

Updating TOC with formula

Hi All, I've updated page numbers in my word document using a formula. Now page numbers have series like 1,1,2,2,3,3.. But, the numbers in TOC are still same as previous. I've tried updating them using "Update field" option available in MS Word 2007 & 2010. Can I use formula here also to change page numbers? if yes, how? Any help on t...

Editing Excel spreadsheats from Word with VBA

How do I edit excel spreadsheets from word using VBA? ...

Word VBA Range.Find object works incorrectly

I found an interesting thing: In word 2010, select some text, and run the following VBA code: public Sub Test() With Selection.Range.Find MsgBox .Execute(Selection.Range.text) MsgBox .Found End With End Sub Both the two message box say "False", but both should be "True". Why? Thanks a lot for your suggestion...

Library to convert Word document text to HTML

Hi, Is there a .Net open source library to convert the word dococument to HTML to display inside the webpage. I know several tools to convert word docs to html files, but my requirements is to convert the doc(either from the file or just extracted text) to HTML on the fly in the ASP.Net application. I found the converting-a-word-docu...

replacing letters (from a phrase) with images

$q = "my phrase with special chars like úção!?"; while ($i < strlen($q)) { echo '<img src="'.$q[$i].'.png" />'; $i++; } i also tried with switch/case but when i have chars like ç Ç ã â i cant get the image replacing to work since its more than one char (i was converting to html entities and then searching in the case ccedil but its ...

Populate a dropdown in word from column in excel and then on dropdown change populate textboxes with related field (VBA)

Hi, I have the following code in a word 2007 macro where I populate a dropdown with customer names from an excel spreadsheet Private Sub UserForm_Initialize() Dim i As Integer Dim cn As ADODB.Connection Dim rsT As New ADODB.Recordset Set cn = New ADODB.Connection With cn .Provider = "Microsoft.Jet.OLEDB.4.0" .ConnectionString = "Data S...

How to deal with single quote in Word VBA SQL query?

Hi, I get a customer name from dropdown and use that value to query an excel spreadsheet, however, the name can contain a single quote (example: Adam's Meat). This breaks my application and how do I make a query with a variable that contains a single quote? Private Sub cboCompany_Change() Dim customerName As String ...

geting semantically related keywords for a given word

Hi everyone. Is there any open source/free software available that gives you semantically related keywords for a given word. for example the word dog: it should give the keywords like: animal, mammal, ... or for the word France it should give you keywords like: country, Europe ... . basically a set of keywords related to the given word...

How do I programmatically insert, or edit, a pie chart in a Word 2007 document, using vs 2010, c#?

I need to programmatically insert, or edit, a pie chart in a Word 2007 document, using vs 2010, c# ... everything i have found shows how to put these old ugly charts into a word doc. so i am now wondering if it is even possible to manipulate the newer and better looking charts. this one shows how to do just what i want, only it's th...

How to deal with null values in Word VBA SQL query?

Hi, I have a dropdown that is bound to a column in an excel spreadsheet. I select a customer in the dropdown and then populate some address fields with related data also from the excel spreadsheet. Code: Private Sub cboCompany_Change() Dim customerName As String customerName = cboCompany.Value custo...

Image quality in "Web Page, Filtered"

Hi, This is an important issue and I would be grateful for a solution. I convert a document (RTF) with several embedded images to HTML with Word 2010. The original quality of all images is 200 dpi. When saving as "Web Page, Filtered", all images are reduced to 96 dpi, despite of what I set in the "Save As" dialog -> Tools -> Web Optio...

add bookmark in word at runtime

I Have to add a bookmark in Word doc using Microsoft.Office.Tools.Word.ControlCollection AddBookmark method is available in ControlCollection class, however when I try to create the object of ControlCollection, it throws and error because this class has no constructor defined... please suggest as how to add bookmark in word document....

What can be wrong with word count program?

I've got a question in my test: What is wrong with program that counts number of lines and words in file? open F, $ARGV[0] || die $!; my @lines = <F>; my @words = map {split /\s/} @lines; printf "%8d %8d\n", scalar(@lines), scalar(@words); close(F); My conjectures are: If file does not exist, program won't tell us about that. ...