Home All Groups Group Topic Archive Search About
Author
5 Jun 2006 10:33 AM
bremze
I am stuck and have run out of ideas...

I am trying to perform this in Visual Studio 2005 using .NET 2.0.
Dim appl As Object
appl = CreateObject("Word.Application")

Works fine in VisualStudio 2003 using .NET 1.1.

Here it throws this error:
Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

What magic do I have to perform to get rid of it?

Thanks a lot!

Author
5 Jun 2006 4:10 PM
Ken Tucker [MVP]
Hi,

        I would avoid late binding.  Try adding a reference to the word
primary interop assemblies instead.

http://support.microsoft.com/?id=301656

Ken
------------------------

Show quoteHide quote
"bremze" wrote:

> I am stuck and have run out of ideas...
>
> I am trying to perform this in Visual Studio 2005 using .NET 2.0.
> Dim appl As Object
> appl = CreateObject("Word.Application")
>
> Works fine in VisualStudio 2003 using .NET 1.1.
>
> Here it throws this error:
> Request for the permission of type
> 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
> Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
>
> What magic do I have to perform to get rid of it?
>
> Thanks a lot!