msword

How can VBA application use the correct built in styles across English and French versions of Windows/Word.

I developed a Word 2003 report generation application that extracts data from a database. Most of the organization uses English versions of Windows and Office. But, many users in our French office use their local versions. If I use any of Word's built-in Heading styles Heading (1-9), the French version expects Titre (1-9). In my curr...

No Dangling Word Headings Between Page Breaks?

Does anyone have a good VBA way (or perhaps there is an MS Word setting I can't find) to make sure that Word headings do not dangle at the end of a page. For example, assume that the numbers on the left are page numbers. 1 This is the second to last line on the page. 1 HEADING 1 2 This text starts page two What I want to do is au...

Source text contains simple HTML. How can I simply format the text in MS Word?

I've inherited a project that stores basic HTML formatting (i.e. - <b>, <i> tags) in a database and writes it out to a Word document. This is my first Word automation assignment, so be gentle! Currently, there is a complicated function that runs after the document is complete that searches and replaces these tags. However, as this is ...

What's the best way to programmatically output a file in the format of a Word document in Ruby?

I need to output a file in the format of a Word document from a Ruby-based web app (Rails/Sinatra) based on some textual content in the app. Is there library support in Ruby for creating and structuring a Word document? ...

Why are the number of pages in a Word document different in Perl and Word VBA?

I have a (set of) Word document(s) for which I'm trying to get various properties (number of pages, author, etc) using Win32::OLE in Perl: print $MSWord->Documents->Open($name)-> BuiltInDocumentProperties->{"Number of pages"}->value . " \n"; This returns 4 pages. But the actual number of pages in the document is 9. The number of pages...

MS Word Macro - Delete Paragraphs

Could somebody please help me with a MS Word Macro that would search for a specific symbol in every paragraph throughout the document and delete paragraphs that DO NOT contain that symbol. I know practically nothing about VBA, but just received a huge & unwieldy document I need to edit real fast. ...

What is the best approach to implement search for searching documents (PDF, XML, HTML, MS Word) ?

What could be a good way to code a search functionality for searching documents in a java web application? Is 'tagged search' a good fit for such kind of search functionality? ...

How do you deal with the "special" characters that MS Word adds?

I'm wondering how you clean the special characters that MS Word as, such as m- and n-dashes and curly quotes? I often find myself copying content from clients from Word and pasting into a static HTML page, but the content ends up with weird characters because the special characters are not converted to their correct ACSII codes and ther...

Auto formatting a web.config in Visual Studio 2008

I am currently in the process of creating API documentation using Microsoft Word 2007 and I need the user to cut and paste a section from the document into their web.config. I formatted the section in the Microsoft Word document for easy readability and when I paste the formatted section into the web.config it maintains the style from t...

Combining Word Documents Without Losing the Individual Formatting

The Word documents I am trying to combine all have Headers and Footers, and I'm trying to combine them into one file while keeping the individual formatting of each document intact. I am using Word 2003 (XP Pro). I have tried a few different approaches already like placing the cursor in the Master document where I want to insert anothe...

Saving Word File as a Picture Programmatically

I'd like to save the first page of a Word document as a picture. What methods are there for doing this with C#? ...

How do I close Word (or other app) if an error occurs in a VBScript?

I wrote a VBScript app to open Word and Excel documents and search and replace blocks of text and various sections, pulling the new text from a plain text file. I purposely avoided any error checking, primarily because I couldn't figure it out at the time (and the script ran reliably anyway). Now months later on my local machine, I am in...

How to embed excel in word programmatically?

Are there any way to do so? I prefer to use VB.NET or Java and try to avoid to use VBA. Thanks! ...

Is there any Java API available to compare two microsoft word documents?

I am looking for a Java API which can compare two microsoft word documents. We are using Linux server so we can't install Microsoft Word in it. EDIT :- We want to compare two document and what ever things are not common that we have to highlight with some color or any other way ... So I thing we have to merge both document and highligh...

Exporting jsp tables to excel, word, pdf

Can anyone suggest me any library/jar files which I can use to export my table to excel/pdf/word. Please tell me if there is any library by which I can create reports in jsp. ...

Open Microsoft Word in Java

Hi there I'm facing a problem, anyone can help me?? The Problem is : I'm trying to open MS Word 2003 document in java, search for a specified String and replace it with a new String. I use APACHE POI for to do that. My Code is like the Following : public void searchAndReplace(String inputFilename, String outputFilename, HashMap<...

how to compare two msword document in java ?

I am looking for a Java API which can compare two microsoft word documents. We want to compare two msword document and things which are not common that we have to highlight with some color or any other way ... So I thing we have to merge both document and highlight content which are not common. We are using Linux server so we can't ins...

Create Word/RTF file with table of contents from Java

Hi, I want to create a Word or RTF file with a table of contents (with links to each section) from Java. From my understanding, iText & Apache POI do not support generating a table of contents. Some clients of the app still use older versions of Word, so I need a library that supports the older Word doc format. Does anyone know how I ca...

Document is not updated after check in from Word

Hi, one of our customers has great problems checking in documents to a SharePoint library form Word 2007. Whenever she check's in a document to the library the meta data as version number and checkin comment are updated but not the document itself. The library is configured in such a way that versioning is activated and documents have...

VSTO: Pasting multiple sections to a Word doc generates phantom macros

I have some VSTO code which generates a Word 2003 document by copying and pasting selected sections from a source document: Dim doc = Globals.ThisDocument.Application.Documents.Add(DocumentType:=Word.WdNewDocumentType.wdNewBlankDocument, Visible:=False) For Each sectionNumber As Integer In requiredSections sourceDoc.Sect...