word

PHP Convert word to html with COM

Hi, Here is my code: $file='C:/a.doc'; $saveas=__DIR__.'/tmp/a.html'; $word=new COM('word.application'); $document=$word->Documents->Open($file); $document->SaveAs($saveas,8); $word->Quit(); $word=null; echo file_get_contents($saveas); ...

Read content of Word file in C# without using Word Application

I"m looking to read the contents of a Word file on an application running on a webserver - without having word installed. Does a native .net solution for this exist? ...

Removing a word from a <p> only using css

Due to mod rights on a site, I can only add css (no js etc...). When users input text in a comment box, it saves it and then displays it as a <p>. is there any way through css i can search for a specific word in the <p> tag and remove/censor it? Thanks ...

Search using FTS Word Documents for exctact word or phrase

Hi, I am trying to search against a Database with MS Word Documents as BLOBS, full-text indexed (neutral language) an exact word or phrase contains dashes (for example : "-c-erb-B2"). The problem is that FTS works in a different way and break it, at "erb" and "B2" and results include additional records that documents include erb or B2....

Javascript :: Div Editable and More... More...

Well, I need to replace a word, in a div contentEdible property on, by the same word but formatted... Like this: <div> My balls are big </div> To this (replace the word: balls): <div> My <font style="color:blue;">balls</font> are big </div> In a contentEditable this happens dinamically, while the user type the text the replacements hap...

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...

How to stop server-generated Word .DOCs from saving with "_files" folders?

I have a Word .DOCument that's being generated by a (classic ASP) server. It's an HTML file that's being output as a .DOC using the application/msword content type. The document is generated fine, saves fine, opens up fine in Word, and is fully editable... The problem occurs on the next document save in Word. A folder is created in the ...

How to get a specific section from Microsoft Word using C#

Need help in figuring out a way to fetch a particular block of content from Microsoft Word document using the section number in C# .NET. For example if a word document which has sections as follows: Introduction Format Description 3.1 Details 3.2 Tables 3.3 Figures Analysis Now from section 3.2, I would like to get access to...

How can i extract word 2003 doc properties from linux command shell?

How can i extract word 2003 doc properties from linux command shell? E.g extract the properties: title, summary, keywords, author, etc I am writting a set of php functions for use ina project that needs to extract meta data from various file formats. Can anyone help? ...

How to prepare a Word 2007 document so that C# can pull data out of it semantically?

I have a friend who is writing a 400-page book in Microsoft Word 2007. Throughout the book he has 200 stories each which consist of numerous paragraphs. When he is finished writing the book, he wants to copy the text of each story that is embedded in his Word document into a database table such as: Title, varchar(200) Description, tex...

Word 2003: Form elements - limit keyboard input to 0-9 only?

When using a date field or number field on a Word form, how can you limit keyboard input to numbers only? Setting the properties of to Date and setting a format (ie. dd-mm-yyyy) does not prevent users from using any other keys than numbers for this field. Even though the document will report an 'invalid date' when leaving the field, I wo...

generate random words from the list of words in c programming

hey, i wanna ask if i have a list of words let say 'tiger, lion, elephant, zebra, horse, camel, deer, crocodile, rabbit, cat' haw can i generate 5 words out of the list randomly in c programming? for example: tiger, zebra, cat, deer, horse or crocodile, rabbit, camel, zebra, elephant ect thank you in advance :D Edit: #include <st...

Word Template, populate fields, C# .NET

Hello Everyone, I have a word document (docx format) that I need to populate with data from a dictionary . The key of the dict will be the word field to be populated. I was wondering what is the best way to do this (bookmarks, mail merge fields, etc)? I did a little work with Bookmarks, but I would like to be able to reuse some of the f...

Vbs - Can't create Word.Application

Hi, this is pretty strange. I'm trying to run a pretty simple vbs code from a terminal server and I have amongst others, this line: Set objWord = CreateObject("Word.Application") Strangely enough, this worked yesterday. But now, all that happens is that wscript.exe just seems to hang. I even tried to put a messagebox before the creati...

How to edit a file that converts xml to Word?

I have a document that transforms xml to word. it starts like this: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; <xsl:output method="xml" omit-xml-declaration="no" version="1.0" encoding="utf-8" standalone="yes" /> <xsl:template match="/"> <xsl:processing-i...

How to make horizontal orientation (album) word document using Microsoft.Office.Interop.Word

How to make horizontal orientation (album) word document using Microsoft.Office.Interop.Word ...

Finding all sentences from list of keywords to dict

I have list of possible words to make anagram of the given words. Each string of list is key to dictionary and has value of one or more words. Which is the best (fastest, pythonic) way to make all possible sentences in the order of the keys from the words in each list of the corresponding keys in the dictionary. Lists have variable numbe...

XSLT 1.0 word count with HTML

I am looking to call a template that will trim down a field to 30 words. However, this field contains HTML and the HTML should not count as a word. ...

can not load to stream on onquit event of wordapplication

Hi I open a document with WordApplication1.Connect; WordApplication1.Documents.OpenOld(FileNameOLE,EmptyParam,EmptyParam,EmptyParam, EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam,EmptyParam); WordApplication1.Visible:=true; and I want to save it to a stream after it is closed but I get cannot open file used by another pr...

Graph.Chart interop in Word

I'm having massive problems when trying to update a chart through MSWord interop. All I want to do is set the values on a chart in a word document so the graph can update to values in my app. I've done the following (after importing Microsoft.Office.Interop.Graph.dll): InlineShape chartShape = WordDocument.InlineShapes[...