LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Updating a word count from a wrod file into excel


Sub Test()

'
FName = "c:\temp\abc.doc"
WordWasRunning = True

On Error Resume Next
Set WDApp = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set WDApp = CreateObject("Word.Application")
WordWasRunning = False
End If

WDApp.Visible = True 'at least for testing!

Set WDDoc = WDApp.documents.Open(Filename:=FName)
Count = WDDoc.Words.Count
Range("A1") = Count

WDDoc.Close

End Sub

"Laebrye" wrote:

Hi everyone,

My VBA knowledge isn't the best, so this may not even be possible. I've
looked through the functions and the data link options and not found anything
that will work - so far.

I'm hoping that someone can give me a rough idea of the sort of code I would
need to update the word count from a word document into a cell in excel.

Dave

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Excel count of 1 word if found in multi-word cells of column Function_Challenged Excel Worksheet Functions 1 August 27th 09 12:08 AM
writing to a table in wrod from excel Jason V[_2_] Excel Programming 0 January 3rd 08 08:00 PM
Updating tables from Excel in Word zil Excel Discussion (Misc queries) 1 May 30th 07 12:48 AM
How to use VBA read entries from a Wrod file into Excel Robin Excel Programming 3 November 30th 05 01:30 AM
Updating Word Excel Links Partho Excel Programming 1 September 8th 03 08:11 AM


All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"