Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

How to check whether a file is a valid word document or not?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sudhakar - 16 Nov 2005 11:07 GMT
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.
Jonathan West - 16 Nov 2005 11:42 GMT
>I would like to know how i can check whether a particular file is a valid
> Word Document or not.
[quoted text clipped - 6 lines]
>
> 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

Signature

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 

Helmut Weber - 16 Nov 2005 12:45 GMT
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 ...

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

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

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.