Thanks Matthew,

The thing that's exteremely confusing is that it happens only sometimes!....
So yes sometimes it works... other times... it doesn't!

I'm starting to find this happens to be an extemely common thing with M$
technologies!!!!!

Cheers,
Jason

On 4/2/07, Matthew Wills <[EMAIL PROTECTED]> wrote:

Jason,

Write the equivalent code in VB6 (or VBA from Excel) and see if you get
the
same behaviour (that will at least identify whether it is a COM Interop
issue or not).

I would be betting on a screwed install of Word or someone fiddling with
DCOMCNFG.

(I assume this is a WinForms app, not ASP.NET right?).

Seeya
Matthew Wills | Senior Analyst Programmer / Solution Designer | Adviser
Tools and Services | Financial Planning and Third Party | NAB Technology

Phone: 02 9957 8183 | Mobile: N/A | Email: [EMAIL PROTECTED]



|---------+---------------------------->
|         |           Jason Nah        |
|         |           <[EMAIL PROTECTED]|
|         |           COM>             |
|         |                            |
|         |                            |
|---------+---------------------------->

  
>------------------------------------------------------------------------------------------------------------------------------|

  |                                                                             
                                                 |
  |       To:       [email protected]
                                                                          |
  |
cc:                                                                             
                                       |
  |       Subject:  [ADVANCED-DOTNET] UnauthorizedAccessException when
instantiating Word                                        |

  
>------------------------------------------------------------------------------------------------------------------------------|




Howdy Guys,

I'm getting an "UnauthorizedAccessException: Access is denied." when
instantiating MS Word with the
folloing line of code:

ApplicationClass wordApp = new ApplicationClass();

I'm using the PIA that allow direct interaction with the Word instance.

Does anybody know how to diagnose this problem and what are the possible
causes?

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop..com




National Australia Bank Ltd - ABN 12 004 044 937
This email may contain confidential information. If you are not the
intended recipient, please immediately notify us at [EMAIL PROTECTED] by 
replying to the sender, and then destroy all copies of this email.
Except where this email indicates otherwise, views expressed in this email
are those of the sender and not of National Australia Bank Ltd. Advice in
this email does not take account of your objectives, financial situation, or
needs. It is important for you to consider these matters and, if the e-mail
refers to a product(s), you should read the relevant Product Disclosure
Statement(s)/other disclosure document(s) before making any decisions. If
you do not want email marketing from us in future, forward this email with
"unsubscribe" in the subject line to [EMAIL PROTECTED] in order
to stop marketing emails from this sender. National Australia Bank Ltd does
not represent that this email is free of errors, viruses or interference.

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com




--
Cheers,
Jason

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to