msword

Mail Merge with XML data file in Microsoft Word 2003

I am trying to do mail merging with XML in Microsoft Word 2003. XML file is normal ASP.NET exported file with address. When I point XML file as data source, the Word error message appear as "ODBC Excel driver login failed. Extenal file is not in the expected format" Any idea how can I resolve the issue with XML? ...

OpenXML: Allow editing of Content Controls in locked Word document

I want to create a Word document that works as a template, where all the document is locked from editing except the Content Controls (<sdt/> elements) in the document that the user can edit. What I've seen is that if I lock the document edition (right now I'm using the _markAsFinal property) there's no way to unlock a single Content Con...

Target header and footer Content Controls in Word 2007

I'm trying to edit a .docx header through Word Automation. If the Content Controls are placed in the body of the text there is no problem, but if the content controls are in the header or footer I'm not able to target them. Is there any way of targetting Content Controls in the header or footer (using Visual Studio 2008 Express)? ...

Inserting/embedding a file to a DOCX file - determining file-type

Let's say I have an API which lets clients insert a file into a DOCX template, they just pass a path to the file. If it's an image I just want to add an image to the file, if it's something life RTF/DOC then I can maybe embed it so the content is visible, if it's some other type like MP3 or PDF then it might simply embed with an icon. I...

How do I write a Microsoft Word/Office Open XML document using Perl?

I have written a Perl script that reads some data and generates an OpenOffice Writer/OpenDocument file for that data. Can I also construct a Microsoft Word/Office Open XML document? ...

Coverting DOC to PDF programmatically

I'm looking for a library to help me convert DOC files to PDF using PHP. I'm also open to using an external website if this functionality already exists elsewhere, as long as this website has a programmatic API and is free. Any suggestions how to approach this? ...

Determine number of columns in a table in Word using VBA

Hi, just a quick question. I've got this table in a Word template which have two columns by default. Then I've got this button the user can press if he wants another column. The macro run inserts several text placeholders and formats certain things automatically. But what I want is some sort of routine which basically checks the numbe...

Creating Online Document Reader, editor

I want to build a online document reader which is a part of my project. I want to work with MS Word document where user have some access to the documents, according to the access he/she have (will be able to edit the document and save). I want to make it as other online documents there like Safari Online Book Reader or Google Book Reader...

Auto creating tables in Word from an Excel document

Hello all. I have a set of data in Excel which is like the below (in CSV format) heading1, heading2, heading3, index A , randomdata1, randomdata2, 1 A , randomdata1, randomdata2, 2 A , randomdata1, randomdata2, 3 B , randomdata1, randomdata2, 4 C , randomdata1, randomdata2, 5 I want to be able to auto build a word document that presen...

Recheck Document For Spellings Not Same as VBA Code

I want to recheck the spellings in a document after adding a dictionary. The problem is the following code (mostly from the macro recorder) CustomDictionaries.Add FileName:="c:\test_dictionary.dic" Application.ResetIgnoreAll ActiveDocument.Range.SpellingChecked = False ActiveDocument.Range.GrammarChecked = False does not produce the ...

Inserting byte array image into Word VBA

I have an image in a byte array (read it in from a MySQL blob column) and I need to insert that into a document using VBA and MS Word. Can I create a shape and use EnhMetaFileBits to "re-hydrate" it? ...

Text replacement in WinWord doc using Apache POI

I need to replace certain text in a WinWord document. The problem is, any text replacement I do on a Range with the replaceText function creates a broken WinWord file unless the replacement and replaced strings are both the exact same length. We will be dealing with dynamic content, so this will not do. Range object specs: http://poi.ap...

Programmatically add footer to Office Word/Excel document

I'm looking to build a solution similar to this one: http://esqinc.com/section/products/4/idocid.html What the system makes is insertion of a document file name into the document footer. How's that possible programmatically (preferably in .NET)? ...

Program the Navigation Pane in Word 2010

I'm trying to find a way to program the new Navigation pane in Word 2010 to change tabs when a user selects a picture in the document. I can capture the selection change with WindowSelectionChange(ByVal Sel As Selection), but I can't figure out how change the tab from "Browse the headings" to "Browse the pages", which is what I want. ...

Opening a MS Word document in a windows service seems to hang

Hi I have a windows service written in c# which reads the text from word documents (doc and docx) using VBA interop. However on certain documents it seems to hang on the call to the Open method. It seems that the problem documents all have macros in them. The locally installed version of word has macros disabled and the code I use to op...

What API can add checkbox to MS Word file using Java?

I wanna make a program to create MS Word file, but some API's can't add checkbox to the document. Someone have done that? Thanks. ...

What toolkit can I use to convert PDF (forms) into TEX forms?

I have some forms that were created with Acrobat, they are fillable PDF files (they contain named fields). Is there a toolkit that will reformat them into TEX/LaTEX files and leave all the fields intact? With Acrobat, I can export the forms to Word format (haven't tried it yet), so that might be another path I can take as well. So may...

Apache POI: Replace paragraph text

I am using Apache POI to generate docx files from a template. There doesn't seem to be an obvious way to replace all text in a paragraph and the documentation is pretty scarce. Right now I am able to read a document by looping through its paragraphs, then looping through each paragraph's runs, then looping through each run's text... This...

Managing WinWord document content for badges printing application. Best practice

I have to generate winword document for badges printing application. Basic scenario is the following: User selects employees from list, click "print badges", winword appears to allow user make some editions before printing. Badges should be represented as table with some columns. Every table cell has image background (badge), some text...

Save Word Document with JACOB (Java)

Hello, i'm trying to make a simple Java program to open an existing word-document, change something and save it as .html-file. The part which is not working is to save it as .html . The problem is, i got the html-file but it's only a renamed doc-file. So not really a .html-file which I can work with. This is what I found with Google: ...