msword

How do you change the subdocument location in a Word 2007 master document programmatically?

We have had the unenviable happen: various master documents refer to sub-documents that are no longer where they used to be due to a directory renaming. Is there a programmatic way of tweaking the HYPERLINK field without losing the master/sub-document relationship? I've got this far ... Sub FixyaLinks() Dim s 'As String Dim i A...

Opening Word documents from IE LAG Windows 7 IE8

Hi, I'm having a lot of trouble opening documents from a network share in word using IE. The documents are located in a network share which is mapped to a virtual directory. The documents are accessed by URLs that link to the virtual directory. There is now a huge lag (sometimes up to a minute or two!) from when clicking on the link ...

Ask Field formatting

I am using ASK fields in a word document, wherein the user are prompted with questions and the document is then built with the answers that the user type in. My question is that word does not allow more that 200 characters in the prompt box wherein the user types in answers to the questions. Is there a way I can increase its maxlength. A...

Any C#/VB.NET sample projects on developing ActiveX Documents(?) to be hosted by MS Word 2000-2010?

Hi All -- Do you know about any helpful C#/VB.NET sample projects on developing ActiveX Documents(?) to be hosted by MS Word 2000-2010? I mean a C#/VB.NET sample project having ActiveX Document project/solution sources, which can be compiled, built and registered, and then ActiveX Document instance inserted inline several times into an...

Web-based document merge solution?

We are looking for a web-based document merge solution. Our application is a web-based project management tool built using Xataface - PHP on Windows IIS + mySQL. We have a function that allows the user to generate a status report in Microsoft Word format based on data in the tool. Currently this function is implemented using LiveD...

Why doesn't my CreateRibbonExtensibilityObject method get called?

Hi I've been tinkering around with the two techniques to modify the ribbon with an MS Word addin (Visual Studio 2010, .NET 3.5), a Microsoft.Office.Tools.Ribbon.OfficeRibbon and Microsoft.Office.Core.IRibbonExtensibility. I was hoping to switch between the two in my addin's CreateRibbonExtensibilityObject, but for some reason it is not ...

Subversion pre-commit hook to clean XML from WebDAV autoversioning client

I know that it isn't normally safe to modify a commit from a pre-commit hook in Subversion because SVN clients will not see the version that has been committed, and will cache the wrong thing, but I'd like to clean the code from a versioning-naïve WebDAV client that won't keep a local cached copy. The idea is that when I look at the repo...

word macro to save a selected range into database.

Is there a way in word to save a selected portion into the database(Ms Access) as range object.So that we can later retrieve it . It is required to generate a report in word ,the section needs to be repeated many times. I have searched net for quite some time but not much material is found. thanks. eg:In a Resume automation application. ...

How to read an word document in matlab

Can we read an word document(.doc) by an command fopen in matlab 6.1? If No please provide some information about the same. ...

InsertFile operation in word 2007 document throwing “Command failed” exception

Hello, I get the “Command Failed” exception when using the following code to insert content from one word 2007 document into another using bookmarks in c# : string filePath = @“C:\temp\one.doc”; object trueObj = true; object falseObj = false; wordApp.Selection.InsertFile( filePath, ref missing, ref falseObj, ref trueObj, ref f...

How to prevent inputting Russian characters in Word with a Word addin?

Hi, Sorry for this vaguely described problem, but please look at the problem from the Win32 API's perspective. I'm writing a Word addin using Addin Express with Delphi, and I use some other 3rd party VCL's also, including virtual stringtree, TNT controls, etc. Now I cannot input Russian characters in Word anymore, but I can input Engli...

Word 2007 Documents in Visual Studio 2010

I'm currently using Visual Studio 2010 Professional, and noticed the ability to create Word 2007 and Word 2010 documents as add-ins with C#. What I'm looking to do is fill in a report-type document with information in my C# application, and then output the final .docx. Is this possible using this feature, and how do I go about doing it?...

Context menu disappears with Word automation

When I am editing a Word document in an OleContainer (inplace) and I switch to another Word document and then I switch back, I cannot use my rightmouse button anymore. The context menu will not show up. This happens on Word 2000, not on Word 2007 (I don't know about other versions). How can I get rid of this behaviour? How to reproduc...

Active printer problem in Printing word document through VB.net

Hi My printer name is \\abc\First Floor A-Block its taking name \abc\First Floor A-Block on NE04:. How should i print it Private oWord As Word.Application Dim lobjDoc As Word.Document Dim strFolder as String Dim pd As New PrintDocument Dim strPrintername as String oWord = CreateObject("Word.Application") oWord.DisplayAlerts = Word.Wd...

Word automation in plain C++

I'm finding resource which is about word automation in C++ ( Win32 API / MFC ) . But it's quite rare. Are there a book or comprehend article about this ?. Thanks so much :) ...

Compress Images in Office with VBA

I'm looking for a way to programmatically emulate PowerPoint and Word's behavior of compressing pictures to 150 or 96 dpi (ppi) (and removing crops, if there). I need to make a whole ton of presentations and documents smaller for distribution and can't open them up one by one to change DPI by hand for all of them. Is there any way to do ...

Merging bibtex reference with MS Word?

I have a paper submission in about 12 hours. I have written references in a separate .bib file in bibtex format. Now please tell how to merge the references with my paper written in MS word in the simplest/ easiest possible manner. I am looking for some automatic tool that does this. I have never used bibtex before. In fact I came to kn...

Converting MS Word 2002 Templates from PC to Mac

I've been asked to convert several hundred MS Word 2002 Templates (on the PC) to work on the Macintosh. I have to evaluate whether the Word Templates can be run in iWork Pages and Microsoft Word for the Mac. The biggest issues that I've found thus far are that I'm unable to convert the following - Macros WordBasic code Visual Basic H...

Storing the selection changed behaviour of Word bookmark in XML format

I am attempting to put together a Word application using VSTO that, amongst other things would contain bookmarks that, when clicked, display information in a custom task pane. I would like to be able to export this document into XML, but if you simply save it in this format, the "pop up" behaviour is lost. I am intending to write an "ex...

Word automation - SaveAs

I try to write a simple MFC - Word Automation to save for every 1 minute. I follow this article : http://www.codeproject.com/KB/office/MSOfficeAuto.aspx And this is what Im trying to implement , I'm new to COM so I think there's problem here: my VBA is generated by Word 2010: ActiveDocument.SaveAs2 FileName:="1.docx", FileFormat:=wdFo...