I would like to know how i can check whether a particular file is a valid
Word Document or not.

I tried to read the "Application Name" atribute in the summary information
of file using ActiveDocument.BuiltInDocumentProperties collection. But it
always returns "Microsoft Word" even though i open a PPT or Excel file.

Please help me in addressing this issue.

Thanks a lot in advance.

Re: How to check whether a file is a valid word document or not? by Jonathan

Jonathan
Wed Nov 16 05:42:28 CST 2005


"sudhakar" <sudhakar@discussions.microsoft.com> wrote in message
news:328A62B8-9C5E-46C5-9A0E-869BC83FDFAA@microsoft.com...
>I would like to know how i can check whether a particular file is a valid
> Word Document or not.
>
> I tried to read the "Application Name" atribute in the summary information
> of file using ActiveDocument.BuiltInDocumentProperties collection. But it
> always returns "Microsoft Word" even though i open a PPT or Excel file.
>
> Please help me in addressing this issue.
>
> Thanks a lot in advance.

Take a look at this article

Getting access to the Document Properties of a Word file
http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org


Re: How to check whether a file is a valid word document or not? by Helmut

Helmut
Wed Nov 16 06:45:04 CST 2005

Hi Sudhakar,

>I would like to know how i can check whether a particular file is a valid
>Word Document or not.

From where? From the operating system, before trying to open it?
From Word, before trying to open it?

>I tried to read the "Application Name" atribute in the summary information
>of file using ActiveDocument.BuiltInDocumentProperties collection.

With "activedocument" you are accessing a word document,
and you get the correct answer...

I wonder ...

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"