word

ASP.NET MVC 2 View (ViewModel) -> MS Word or PDF Generation?

Id like to have my mvc 2 app generating reports in both MS Word and PDF formats....currently working on Word. I found this: http://www.revium.com.au/articles/sandbox/aspnet-mvc-convert-view-to-word-document/ Which i think basically streams the view output from a controller action to a word document.... public ActionResult DetailedRe...

Run-time error 459 when using WithEvents with a class that implements another

I am developing a VBA project in Word and have encountered a problem with handling events when using a class that implements another. I define an empty class, IMyInterface: Public Sub Xyz() End Sub Public Event SomeEvent() And a class, MyClass that implements the above: Implements IMyInterface Public Event SomeEvent() Public Sub ...

Python win32com - Automating Word - How to replace text in a text box?

I'm trying to automate word to replace text in a word document using Python. (I'm on word 2003 if that matters and Python 2.4) The first part of my replace method below works on everything except text in text boxes. The text just doesn't get selected. I notice when I go into Word manually and hit ctrl-A all of the text gets selected ...

use vbscript to get 32 bit floating point into binary byte or word representation

Hello, I don't know how to do two somewhat related task within vbscript (not vb) -I need to break a 32 bit floating point into it's 4 byte binary representation. -I need to break a 32 bit floating point into it's 2 word(aka16bit) binary representation. For example, 65535.0 in format binary is 1000111011111111111111100000000 65535.0 in ...

word ladder in python

I'm trying to create a word ladder program in python. I'd like to generate words that are similar to a given word. In c++ or java, I would go through each valid index in the original string, and replace it with each letter in the english alphabet, and see if the result is a valid word. for example (pseudocode) for (int i = 0; i < word.l...

Get current Cursor Position in Word (VSTO)

Is there a way for a Word Add-In to get the current cursor position within the document/on screen (e.g. to display my own control next to it)? ...

Word 2007 COM - Can't directly access a page when word is set to invisible

I'm using Word 2007 via COM from PHP 5.2 Apache 2.0 on a windows machine. The goal is to programmatically render jpeg thumbnails from each page in a Word document. The following code works correctly if you set $word->Visible to 1: try { $word = new COM('word.application'); $word->Visible = 0; $word->Documents->Open("C:\\tes...

how to use php to include an image in a word file?

Hi all! Somebody has asked me to make an app in php that will generate a .doc file with an image and a few tables in it. My first approach was: <?php function data_uri($file, $mime) { $contents = file_get_contents($file); $base64 = base64_encode($contents); return ('data:' . $mime . ';base64,' . $base64); } $file = 'new.doc...

How can you remove a field from a word document?

Dear reader, I'm working on a project where the user can insert data into a document using fields, document properties and variables. The user also needs to be able to remove the data from the document. So far, I've managed to remove the document property and variable, but I'm not sure how I would go about removing the field (that's alr...

Access RichTextContentControl Text from an AddIn in MS Word using C#

I've created an AddIn for MS Word. There's a new tab and a button. I've added a new template document that has a RichTextContentControl in it. WORD_APP = Globals.ThisAddIn.Application; object oMissing = System.Reflection.Missing.Value; object oTemplate = "E:\\Sandbox\\TemplateWithFields\\TemplateWithFields\\Tem...

load a word document inside window browser

Hi, I have a page that dynamically links to a document that opens in a new page (the document is stored in a database as binary data and I loaded using the following code: Response.ClearContent() Response.ContentType = myReader("MIMEType").ToString() Response.AddHeader("Content-Disposition", "inline; filename=" & myReader("Filename"))...

Dialog of my Word add-in not using visual styles

I have written a Word add-in in C++ using plain Win32 API. It opens some dialogs but these are always shown without commctl6 visual styles on Vista+. The manifest is in place as RT_MANIFEST and resource ID - 2 (as shown below). When I invoke the same functionality/dialogs from my own test app, visual styles are OK. Any idea how Word is ...

Is there a Platform-independent Web-based replacement for Word Templates?

The above Title is my Manager's words, not mine. :) This is a follow-up to a question that I posted previously. After reading my assessment on the impacts of converting Word Templates from PC to Mac, I have now been asked to investigate whether Word Templates can be replaced with a "Platform-independent Web-based solution" (her words, n...

Is it possible to add some data to a Word document ?

Is it possible to add (thru the MS Word object model? or by editing file) some custom data (another file maybe?) Will be that data preserved after opening, changing and saving document in MS Word ? (I need to put some tracking data in docx during some report export, custom data will be used again during import) ...

Strip style comments in string pasted from Microsoft Word with PHP

I have a text area that users typically paste content from Microsoft Word into. I am using Tiny MCE for formatting. The problem is they string that gets pasted always has style definitions that are commented out. I need a way to strip this commented stuff out of the string. Here is an example of the comments that get added: <!-- /* Fon...

How do I change the name of a variable in a word document?

Dear reader, My application allows the user to insert information into a document (using document properties and variables). Part of this is also that they should be able to adjust the values they have previously entered. Changing the Name and Value of a document property is no problem, but apparently the variable Name has a get propert...

I want to Add one menu bar in MS word

hi all. I want to add one menu bar in MS word from which a pop window will be appear. there will be predefined combobox. user will select his desired option and TEXT data will come from some file according to selection. This is basically to just insert the some poetical work after selection the poet name and his content. plz give me ...

How to make documents read-only in document libraries.

After document approval, i want set it to a final status where newer version of document cannot be uploaded or any modifications made (i don't care if it is downloaded and modified on users PC, but it must stay as is in SharePoint). I see few options here: break permission inheritance and set all roles to read only. EventReceiver on I...

Can I have LaTeX-style floats in Word?

I'm a (rather experimented) LaTeX-user... but unfortunately, I have to use Word (2000 (!)) at work. One of the things I miss the most (I mean, except the typographic quality, the macros and the math stuff :P) is the LaTeX-style float. Is there some way to put a picture in a floating position (eg, like with \begin{figure}[htp]) in Word? ...

What's the easiest way to fill gaps in a list of numbers?

Dear reader, I'm having some trouble explaining the question in a single line for the title, but hopefully this description will provide you with enough insight to fully understand my question: I have a few variables in a Word document. Every variable has a Value which is a number (starting from 0 up to the number of variables). A Sort...