Count number of words in MS Word doc without opening it - VB.net 2010 - ms-word

I'm working on Visual Basic 2010 Express, and I am looking for a way to count the total word number of an MS Word document (.doc or .docx) from my application.
In fact, I found several ways to do that, but all of them require my application to open the word file, which is not always possible in my case.
Is there any way to get this MS Word file detail without opening it ?
Would you please suggest me a way to get this done?
Thank you in advance.

Related

Create a desktop app that generate ms word file

I'm now working with tons of MS Word files and trying to find a way in improving my workflow.
I'm wondering if there's a way to create a desktop app which can preview certain parts from a Word file, select them and generate a new one with controls in Word's text style, paragraph, etc.
I supposed that this would take MS Word API and some frame structure particularly. I've been using Electron/node.js to create some cross platform applications, wondering if it can do as well? Or is there any reference that I can dig in?
Sorry if this sounds like a rookie one. I've tried to search but still can't find out where to start.
There are three possible ways to get the job done:
Automate MS Word to get job done. See Automate MS Office Applications using Python win32com module for more information. For example:
import win32com.client
word = win32com.client.Dispatch("Word.Application")
Use the Open XML SDK for generating Word documents at runtime, see Welcome to the Open XML SDK 2.5 for Office for more information.
Use third-party components.
If you are on Windows, there seem to be some way to access Word files in Python: https://www.blog.pythonlibrary.org/2010/07/16/python-and-microsoft-office-using-pywin32/. Maybe in node too.

Automatically loading Word Task Pane Office Add-in

We are developing a Word Task Pane Office Add-in (not VSTO) for internal organization documents
In Word 2013 (desktop) when we insert the add-in and save the document, when we reopen that document the add-in is automatically loaded.
In Word Online, this behavior is different, the add-in doesn't get automatically loaded. The user has to manually insert the add-in every time the document is opened.
Is there a way to automatically load it in Word Online?
Would running our own Office Web App Server help?
Is there a way to load the add-in through a parameter? (maybe query string?)
Thanks
We have changed the behaviour you describe: starting in January, Word Online add-ins will be persisted in the document just like they are in Word for desktop. So #1 is not supported now but will be soon. Workarounds like #2 and #3 are not available now.
Thanks!
-Michael (Microsoft Program Manager for add-ins)
Thank you for posting this issue and giving us the opportunity to find a resolution. It looks like we are having a temporary issue at present where the Office Add-ins width is getting saved to 3 pixels. We are striving to find a resolution as soon as possible. In the mean time you can try the following workaround
Temporary workarounds:
1.Opening the file in excel client app and saving the file will fix the width issue because we have a minimum width set in excel client app.
2.open the file in open xml editor, locate \xl\webextensions\taskpanes.xml and edit 'width' property of entry to a greater value, say, 300.
After the file is edited in client or excel client, excel client respects the new value and it do NOT go back to value 3. The issue seems to be only repro with the add-ins inserted in excel WAC only.
We will update the article once it is fixed
Thanks,
Sky
Microsoft Program Manager.

Convert Word document of MS WORD 2003 To Tiff images

I have a word document created using MS Office 2003.Now i developed a web application using ASP.net in which i used a file upload control to upload word document files.My requirement is to convert the uploaded word document to tiff/jpg and displayed in iframe.please tell me the possible ways to achieve this.
If you have heard of Aspose, they have simple feature to achieve this.

Is there a way to get a reference to results after creating word documents using mail merge?

I'm using a VSTO 2010 AddIn to do a Word mail merge with WdMailMergeDestination being set to wdSendToNewDocument. Is there any way to get a reference to the newly created documents or even find out which data row was used to create each one?
Hi Christopher i am working on the same thing and so far i have managed to create an add-in for the outlook. So the Word mail merge completes and the mail in the Outlook outbox folder, right before being sent will attach the attachment of any type.
I am using this for mass scale i am talking about 5000-7000 mails at one go, and the add-in failed me, by attaching to only some emails its like on and off (my guess is the add-in not able to handle the heavy duty). So now i am going a bit further in to the solution by capturing the mailmerge object in the word. (btw i am using i am developing for 2007 should be no problem for 2010 as well)
So far i can suggest you this article that i managed to dig if you have a found a solution please do share tks.
http://support.microsoft.com/default.aspx?scid=kb;en-us;301659
P.S: I know that there are people selling this kind of software commercially.But its best if homebrewed!

Convert Word 6.0 to Word 2003 programatically

With the latest security update from MS
Security
Existing word templates documents could not be loaded and they started throwing exceptions each time we load.
We would like to convert the existing Word 6.0 to Word 2003 programmatically or by using a tool.
How do we convert using .NET? Or any existing MS Tool
Thanks for the help
I'd start with here on how to programmatically hit Word's object model. Once you get that down, it should be a simple matter of writing a program to get Word to open a file and then perform a "Save As" for every file you have.
your other option is to use OpenOffice in a scripted way.