OK, working with the MS Word object (still). I need some help porting over this VB code to CF so that it will work. Here is the VB Code:
Sub Test() Dim DocOpen As Word.Document Set DocOpen = Documents.Open("c:\blah.doc") Set temp = Dialogs(wdDialogToolsWordCount) temp.Execute numWords = temp.Words With DocOpen MsgBox "This doc has a count of " & " " & numWords .Close wdDoNotSaveChanges End With Set DocOpen = Nothing End Sub Works perfectly. So I am trying to get this to do the same thing in CF, without the msgbox, obviously. Here is where I have gotten: <CFSCRIPT> OpenDoc = objWord.Documents.Open("c:\blah.doc"); Count = opendoc.words.count(); temp = openDoc.Dialogs(wdDialogToolsWordCount) OpenDoc.Close(); objWord.Quit(); objWord = "Nothing"; </CFSCRIPT> Does not work, it is telling me that wdDialogToolsWordCount is undefined. So I have even tried declaring a variable like "myvar = "wdDialogToolsWordCount" and it still fails. How can I port this VB over to CFScript where it works? Can anyone help? Thanks in advance! Thanks! Robert Bailey Famous for nothing ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4