word

Word COM/OLE/VBA: How to save to/load from memory a document?

Hi, According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document object can only load a file from disk or save a file to disk. Is it possible to save a document to memory or load a document from memory? Since I need to save the documents to a database instead of to disk files. I use Delphi. Thank you in ...

Word 97 and .NET events.

How to receive COM events generated in .NET 2005 with MS Word 97 (visual basic for applications)? ...

Custom Word Bibliography Source Template

Having looked through the Word help and online resources about customising bibliographies in Microsoft Word, and finding several posts on customising the 'style' and XSL transformation 'layout' of bibliography source templates, I am sure, given the dynamic functionality provided in this area that it must be possible to create custom sour...

Word VBA Section break character in

How can you detect if the selection you have contains or is the section break character? At the moment I select a page , collapse to the end , I want to know if the end of the page contains a section break or not. I was going to use a method where I compare the section number at the end of the page , then move two characters forward , ...

Added Word Doc to CVS - became corrupt

I'm using CVSNT. I added a Microsoft 2007 docx file "as text" to the repository. After committing and before updating I tried to open the file again but was unable to. It said it was corrupt. I tried using the office word doc recovery and that was unable to recover the document. From what I understand I should've added the word doc a...

Replace text using regular expressions in MS Word - C#

Hi all, I have a Word document that I want to open and replace all instances of a social security number with the word, "test". I already have the code to open the document. Here's the code that would do the replacement. However, I'm having trouble with using regular expressions at this point: _wordApp.Selection.Find.Text = ; within m...

How to find the position or location of string in given document.

How to find the position or location of string in given document.I have one word document and i want to store all its words and word positions in database so thats why i need to find the position of the words. so please tell me how can i find position or location of word or string in given document. Thanks in Advance. Dhiraj ...

Renaming OpenXML Styles

In my attempt to go through and rename styles before feeding multiple docx's into a merge library I have created a large and complicated routine that modifies the <w:style w:styleId="..."> and <w:name w:val="..."> attributes of the style element. Then modifies any reference to old style id's in the rest of the docx. This seems as if it ...

Why doesn't SaveAs use correct PixelsPerInch in macro?

...

Get the number of visible chars on a line before the cursor, programatically im Microsoft Word, using C++

A bit of background: My program reads text from a number of applications so that handicapped or children can hear it. To do this, it has an internal buffer where the text is, and an internal representation of where the cursor is. So, if the cursor is | the result for this line would be 21 (or thereabouts) :) Now, to get the cursor posi...

MS Word Interop: Cancel (Don't Show) the 'Save Changes' Dialog on Close

Hi, I'm using MS Interop to open a generated file for a user, allow them to edit it and then close it, after which I save it for them (it's part of a larger process). Since the user doesn't need to save the file manually I would like to cancel that pop up dialog to save the file when the user tries to close the document. The following d...

Replace MergeFields in a Word 2003 document and keep style (c#)

Hi I've been trying to create a library to replace the MergeFields on a Word 2003 document, everything works fine, except that I lose the style applied to the field when I replace it, is there a way to keep it? This is the code I'm using to replace the fields: private void FillFields2003(string template, Dictionary<string, string> v...

Saving Word 2007 Document Properties in C# 2.0

Hi all, I'm trying to modify some CustomDocumentProperties for a .docx document. So far I've been able to read the current value and modify it, but, for whatever reason, whenever I save the document the changes to the custom fields are lost. I have the following method within a DocAccessor class (which serves as an interface for my doc...

how to wrap report for word output in jasper report?

Hi, I have report where report width is more than 2000px; it is working fine with pdf and excel output but when we export for word it is showing 550px; report only other part we are not able to see. We have one report which contains ... abcdefghijklmnopqrstuvwxyz when we export for excel or pdf it's working fine but when we export fo...

Starting Word from Access - 2nd time fails

When starting up Word from a form in Access, I do this: Dim wordApp As Word.Application Dim wordDoc As Word.Document Dim wordRange As Word.Range Set wordApp = CreateObject("Word.Application") wordApp.Visible = True Set wordDoc = wordApp.Documents.Open(etikettenTemplate) ' fill in some bookmarks in the word doc...

Developing Word add-ins for Macintosh

I have an add-in for Word 2007 developed using VS2008/.NET 3.5. What do I need to do in order for Mac users to use this add-in with their Word 2008? (or did MS made sure it would be impossible to do...) Thanks guys, you saved me a lot of time. ...

Hide the EPS conversion dialogue in Word

I have some vba code which inserts a picture into Word , the source file is an EPS. Word automatically displays a progress dialogue when it's converting the image. Is there anyway to hide this dialogue (using vba)? Thanks Chris ...

Can grep show only words that match search pattern?

Is there a way to make grep output "words" from files that match the search expression? If I want to find all the instances of, say, "th" in a number of files you do; grep "th" * but the output will be something like (bold is by me); some-text-file : the cat sat on the mat some-other-text-file : the quick brown fox yet-another-text-f...

Updating Word Template with bookmarks

Hi. I have Template made in Word 2003 which is sometimes updated (adding text, bookmarks, formfields ...) and its located on intranet and has the same name all the time (for example "Master_layout.dot"). When somebody create the document from this template (for example version 3) and then I will make version 4 then the document made from...

Finding words from random input letters in python. What algorithm to use/code already there?

I am trying to code a word descrambler like this one here and was wondering what algorithms I should use to implement this. Also, if anyone can find existing code for this that would be great as well. Basically the functionality is going to be like a boggle solver but without being a matrix, just searching for all word possibilities from...