Aj Pdl
asked on
How to check word document file is empty or not from excel macro?
I want to check user provided MS word file is empty or not from excel macro.
Although i test as following example, its not work.
Word VBA: How do I determine if the current Word document is ...
Although i test as following example, its not work.
Word VBA: How do I determine if the current Word document is ...
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Test the file size:
Function IsFileEmpty (strFileName As String) As Boolean
IsFileEmpty = FileLen(strFileName) = 0
End Function
ASKER
Thanks for everyone, Thanks @Rgonzo1971. Its work now. :)
Just out of curiosity, did you try my proposed solution?
That's my fault. I should have asked you about the criteria for considering a document empty. Never mind, glad your issue has been resolved. :)
Open in new window