+ Reply to Thread
Results 1 to 5 of 5

How to open a Word.doc using VBA and count the words in the word.doc?

  1. #1
    Registered User
    Join Date
    10-31-2007
    Posts
    5

    How to open a Word.doc using VBA and count the words in the word.doc?

    I have problem writing a code to open a word.doc and count the different number of words in the doc. my code is as follows. Can anyone tell me what is the prob?

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 11-01-2007 at 03:11 AM.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    See how this goes.


    Please Login or Register  to view this content.
    rylo

  3. #3
    Registered User
    Join Date
    10-31-2007
    Posts
    5

    Thnks

    Thnks for your help. It worked. Do you mind if u can help me with how can i make all the word in the word.doc file to be tabulated so as to able to know the frequency of evry repeated words? thnks if anyone can help..

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try this

    Please Login or Register  to view this content.
    Something I found out is that the wordcount used this way will include all the punctuation and paragraph marks. It doesn't bring back the same count as the word count from the document itself.

    The above script will therefore show some "blank" characters which may be paragraph marks, tabs etc.

    HTH

    rylo

  5. #5
    Registered User
    Join Date
    10-31-2007
    Posts
    5

    Smile Thnks for your reply

    Thnks you once again for helping me. Your help has been so beneficial and appreciated. Have a nice day

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1