apondu
02-17-2006, 04:36 AM
Hi,
I wanted to know how to check whether the word document which i am
trying to open during the automation of the word is password protected
or not. And how to deal with the documents that are password protected
and how to deal with the documents that are not password protected. I
am using C#.NET for the automation of the word documents. It would be
very helpful if u could provide some code snippets.
Thanks for the help
Govardhan
Jonathan West
02-17-2006, 12:12 PM
"apondu" <apondu@gmail.com> wrote in message
news:1140150986.174243.24200@g14g2000cwa.googlegroups.com...
> Hi,
>
> I wanted to know how to check whether the word document which i am
> trying to open during the automation of the word is password protected
> or not. And how to deal with the documents that are password protected
> and how to deal with the documents that are not password protected. I
> am using C#.NET for the automation of the word documents. It would be
> very helpful if u could provide some code snippets.
>
> Thanks for the help
>
> Govardhan
>
Take a look at this article. The code is VBA, but you should be able to
adapt it.
Skipping Password-Protected Documents in a Batch Process
http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.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
apondu
02-17-2006, 01:49 PM
Hi,
Thanks a lot for the response. I'll try tht article and see whether it
works out for me.
Thank You
Govardhana
Jonathan West wrote:
> "apondu" <apondu@gmail.com> wrote in message
> news:1140150986.174243.24200@g14g2000cwa.googlegroups.com...
> > Hi,
> >
> > I wanted to know how to check whether the word document which i am
> > trying to open during the automation of the word is password protected
> > or not. And how to deal with the documents that are password protected
> > and how to deal with the documents that are not password protected. I
> > am using C#.NET for the automation of the word documents. It would be
> > very helpful if u could provide some code snippets.
> >
> > Thanks for the help
> >
> > Govardhan
> >
>
> Take a look at this article. The code is VBA, but you should be able to
> adapt it.
>
> Skipping Password-Protected Documents in a Batch Process
> http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.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