word

The Most Efficient Way To Find Top K Frequent Words In A Big Word Sequence

The question can be described as: Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text. My thinking is like this. 1) use a Hash table to record all words' frequency while trave...

What is the best way to calculate word frequency in VB.NET?

There are some good examples on how to calculate word frequencies in C#, but none of them are comprehensive and I really need one in VB.NET. My current approach is limited to one word per frequency count. What is the best way to change this so that I can get a completely accurate word frequency listing? wordFreq = New Hashtable() Dim ...

Need a simple RegEx to find a number in a single word

Hi Folks, I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word. /page/{currentPage} so.. can someone give me a regex which matches when the word is a number (any int) greater than 0 (ie. 1 <-> int.max). cheers! ...

What's the best way to determine the total number of words of a file in Java?

What is the best way to find the total number of words in a text file in Java? I'm thinking Perl is the best on finding things such as this. If this is true then calling a Perl function from within Java would be the best? What would you have done in condition such as this? Any better ideas? ...

COM Integration from ALBPM - Cannot find IDispatch for '{00020906-0000-0000-C000-000000000046}'

I am trying to use the Office COM components in order to create Word and Excel documents. Unfortunately I can not achieve this because I am getting an error. Cannot find IDispatch for '{00020906-0000-0000-C000-000000000046}' in module '{00020905-0000-0000-C000-000000000046}', v8.3 I tried reinstalling Office, my applicatio...

Programmatically set DLL search path in VBA macro

The problem I have a word template which uses VBA's Declare statement to link to a dll, whose path can be determined within the VBA macro I want to delploy this to the users %APPDATA%\Microsoft\Word\STARTUP directory I DON'T want to permanently change the user's PATH environment variable (temporarily would be OK, but this doesn't seem ...

Option in diff to show differences in lines that include a certain word

Hello all, Is there any way using diff to show differences only in lines that include an specific word?. Thank you. ...

Word comparison algorithm

I am doing a CSV Import tool for the project I'm working on. The client needs to be able to enter the data in excel, export them as CSV and upload them to the database. For example I have this CSV record: 1, John Doe, ACME Comapny (the typo is on purpose) Of course, the companies are kept in a separate table and linked with...

How do I display office and/or pdf content on a windows form?

We have an application in which admin members can add content for their subordinates to view. Their requirement is that it should be able to display word, excel, powerpoint and pdf documents in a non-editable manner. The one option that I found for doing this is to have the content loaded into a web browser component. The downside to ...

VBA word range question

I want to find a string in a word document and delete everything after it. What is the best way to do this without using the selection object? Thanks ...

Algorithm for separating nonsense text from meaningful text

I provided some of my programs with a feedback function. Unfortunately I forgot to include some sort of spam-protection - so users could send anything they wanted to my server - where every feedback is stored in a huge db. In the beginning I periodically checked those feedbacks - I filtered out what was usable and deleted garbage. Th...

How to use Word MailMerge to send document to a SOAP Web Service

Hello, I'm looking for a way to use Word mail merge for sending merged documents to a webservice I'm using. This webservice accepts word documents. I would like to start a regular mail merge process, design my document, add a recipient list and merge fields. Then I would like to click a button which will cause Word to generate each docu...

Parse Pdf File and write content in word file using java

how to Parse a PDF file and write the content in word file using Java? ...

Visual Studio Tools for Office 2008 - using a ribbon button to interact with active document

I've created my own ribbon toolbar tab with a few buttons. I can add text and similar actions to the document I'm working on. Now I want to add a button that will save the document I'm working on without using the Word save button because I want to set some of the parameters. Every example I found showed how to save a document that was...

VSTO: Changing Existing Word Ribbon Tabs

Using Visual Studio 2008 Pro, is it possible to make changes to the existing Word ribbon items? For example, can I add an additional mail merge option to the "Finish" group in the "Mailing" tab? ...

Open files in Word via ribbon code-behind

Using VSTO, I've created a custom tab in the Ribbon designer and added some groups and button controls there. When user clicks one of the buttons, I'd like to connect to a SharePoint site and open a word document from it in Word (an instance is already open). I'm able to connect to the SharePoint site already and have the URLs to the d...

Can a .NET Word 2003 add-in be installed outside of the GAC?

I've created a Word add-in component, and a visual studio setup project to install the component. On a clean machine with Office 2003 installed, it does not seem to be possible to get the add-in component to load in Word. Googling the issue suggests that this is because the assembly is not trusted. I gave the assembly full trust using ...

Populate a form and print out document

I have a word document which is a blank form. I need to be able to fill it in programatically using .NET, and print out the result. The form I have is a word document but I could obviously convert this to pdf if need be. Can anyone please help? Thanks Ronnie ...

Merge fields in Office 2007 or 2003 using C#

I want to set up a template document along the lines of this: ================ Doc content ---------------- Merge Field1 Merge Field2 Merge Field3 ---------------- More doc content ================ I then want to be able to open the document, load a DataTable from the database in C# and merge the fields in the template section in ...

Word automation find out if a bookmark is in a table

I am using Word Automation to manipulate some documents (yuk!). I am using this command to get a bookmark within a document. Object oBookmark = "MyBookmarkName"; Range oRngoBookmark = wordDocument.Bookmarks.get_Item(ref oBookmark).Range; What I want to find out is if that bookmark is in a table in the document or not. Is there an easy...