Hi all,
I am using the macro to get the single document details. but in the folder i have more than 100 document. can you please help me for loop.
I am using the macro to get the single document details. but in the folder i have more than 100 document. can you please help me for loop.
Code:
Public Sub test() Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
Location = ActiveSheet.Range("f1").Value
Set objDoc = objWord.Documents.Open(Location)
ActiveSheet.Range("A2").Value = objDoc.BuiltinDocumentProperties(14)
ActiveSheet.Range("B2").Value = objDoc.Words.Count
ActiveSheet.Range("C2").Value = objDoc.Characters.Count
objWord.Quit (False)
MsgBox "Completed"
End Sub