word

Move data from Excel to Word and reformat it

Hi, is there a way to move the data from an excel sheet to a word document and reformat it. I'd like the data in the first column to be formatted as 'Heading1' and the data in the second column to be formatted as 'Normal'. So that every row results in a header and a content, but without a table itself. ...

How To Get the Range of a Page Using Word Automation

How do you find the range of page n in Microsoft Word using office automation? There appears to be no getPageRange(n) function and it is unclear how they are divided. ...

Converting words to numbers in PHP

Hello there, I am trying to convert numerical values written as words into integers. For example, "iPhone has two hundred and thirty thousand seven hundred and eighty three apps" would become "iPhone as 230783 apps" Before i start coding, I would like to know if any function / code exists for this conversion. ...

What are the effects of an "XML Roundtrip" on Word 2003 documents?

Saving a Word 2003 document to XML and then back results in a reduced file size, and probably more that I don't know about. A diff on the WordML of the new document against the old shows differences only in the revision save ID's. So, what is getting lost in the roundtrip? If nothing is actually getting lost, then how would one explain ...

VBA: Using WithEvents on UserForms

I have a Word userform with 60+ controls of varying types. I would like to evaluate the form every time a control_change event is triggered and change the enabled state of the form's submit button. However, I really don't want to write and maintain 60 on change event handlers. Could anyone help me out? Cheers ...

Automatic update of keyword in Word document

As part of our build process (java build with ant), I want to update a version number somehow in or near a Word document (software guide). "near" meaning I'd accept updating the document properties rather than something in the text itself. From looking around the internets, it looks like the main option is writing a small C# program tha...

webDAV / PHP / MS Word question

Can someone explain this strange (or normal) behaviour: I've got an Webdav directory. In this folder, I have a word document, called document.doc. When I open Word, en then choose to open file, and fill in the whole URL (http://server/webdav/document.doc), Word will open the document just fine. Changes I make are being saved on save cli...

Read Word 2007 file and extract text, comments, and commenter name using ASP.NET/C#

I have an ASP.NET app that permits Word 2007 document uploads. Once they are uploaded I'd like to parse out the document text and also any comments made by reviewers. I'd like to be able to get the comments and the commenter initials/name. Are there free libaries to do this? I prefer not to automate Word as this process needs to be some...

VSTO: How to add text after a bookmark in Word with different formating within the text

I have a word document with a bookmark. I use the bookmark to get a range object which I then set the text of and add to the document. Now I want to add text after that newly added text but with different formatting how do I do this? Now I use something like object oRangeStart = (object) previousRange.End + 1; object oRangeEnd = (object...

Counting word occurrences in a table

Hi, I have a table with a varchar(255) field. I want to get (via a query, function, or SP) the number of occurences of each word in a group of rows from this table. If there are 2 rows with these fields: "I like to eat bananas" "I don't like to eat like a monkey" I want to get word | count() --------------- like 3 ...

Javascript OLE Word

I want to show a MS Word environment in an Iframe without all the toobars. The document that is being showed contains input fields. After these fields are filled in, the document must be printed. I have created the print button and want the (filled in) document printed when this button is clicked. I hope you understand want I want and h...

Apache POI HWPF, replacing text in .doc documents fails

I try to write down the result of the POI unit test at: code here, by adding the line daDoc.write(new FileOutputStream("C:\\wordtest.doc")); to the end of the method testRangeReplacementAll. The new document is corrupt when I try to open it with word 2003. Any suggestions to fix this? ...

Copy Excel cell and past it into active word file (in to a field) via a vb code

Hi I need to have a vb code in ms word 2003 that copy a a specific cell in excel file and paste it in word (filed). belwo what i have done and it result in error. thanks h.khuraidah quote Sub cmdGetNumber() Dim XL As Object Dim WBEx As Object Dim ExelWS As Object Dim appwd As Object Dim wdApp As Word.Application '''' 'On Error GoT...

Word vba - Determine which button was pressed?

Hi, I'm wondering if there's a simple way for a Word macro to determine which button was just pressed? I have a document template with several button which should all fire a macro. The thing is, I want to create ONE macro which is called in each button. I don't want tons of macros for each button. Now, this macro, when the button is p...

VSTO for Word and Autotext

I'm trying to migrate a VBA macro to VSTO (Word). In the macro I did the following to insert an Autotext at the currently selected Position: ActiveDocument.AttachedTemplate.AutoTextEntries("agenda#").Insert where:=Selection.Range, RichText:=True Now I've added a rich-text-contentconrtol (XYZ) to the document, but I'm not able to find ...

C# word.open() error - Attempted to read or write protected memory

I am trying to open the word document as follows. wordDocument = wordApplication.Documents.Open(ref paramSourceDocPath, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref paramMissing, ref par...

Word Digital Signature

From what I understand PDF is an open format and you can digitally sign the PDF document as proof using a certificate issued by a CA which follows open standards.What about Microsoft word can I sign using an open standards certificate? Can someone clarify if I can do a signature on word using a standard certificate or only from Microsoft...

VSTO - Shared addin for Word and Excel to modify the ribbon

I have successfully used the Excel and Word addin templates in Visual studio 2008 to create a project that adds to the ribbon, but I am having difficulty with shared addins. I have created an add in that uses a xml file to modify and add to the ribbon and I can catch the events from buttons added, but I can't for the life of me figure o...

Duplicating Word document using OpenXml and C#

I am using Word and OpenXml to provide mail merge functionality in a C# ASP.NET web application: 1) A document is uploaded with a number of pre-defined strings for substitution. 2) Using the OpenXML SDK 2.0 I open the Word document, get the mainDocumentPart as a string and perform the substitution using Regex. 3) I then create a new d...

How to index and search .doc files

I have an application that needs to have .doc files uploaded to it. These documents should then be index and the whole collection of documents should be searchable. This will run on a Windows Server, without Word installed, using IIS and SqlServer, but I'd rather not be tied to SqlServer's full text indexing. I was thinking of using Luc...