Home All Groups Group Topic Archive Search About

Client-Side Word Automation

Author
20 Jul 2006 1:42 PM
funkebunch
I am hosting a C# UserControl in IE that attempts to automate Microsoft
Word.  When opening Word I get an Error:
System.Security.Permissions.SecurityPermission.  How can I give my
control permission to open Word?

Author
21 Jul 2006 12:20 AM
GarthS
To utilise the Word interopt libraries you need to give the process
permission to load the word application:
Open Component Services

goto Component Services\Computers\My Computer\DCOM Config\

right click on Microsoft Word Document and choose properties.

On the security tab choose customise for the Lauch and Activation
Permissions and click edit.

Add the permissions for your application process (normally [machine
name]\aspnet for web sites).

Hope this helps,
Garth.

Show quoteHide quote
"funkebu***@gmail.com" wrote:

> I am hosting a C# UserControl in IE that attempts to automate Microsoft
> Word.  When opening Word I get an Error:
> System.Security.Permissions.SecurityPermission.  How can I give my
> control permission to open Word?
>
>
Author
21 Jul 2006 1:31 PM
funkebunch
GarthS,

That would be the method for giving a server-side control permission to
open Word.  My control is running on the client, and it was .NET
security blocking access to Word.  I discovered that I had to open the
..NET Configuration, add a group for my web site, and give it FullTrust
permission for this to work.  Thanks anyways though.


GarthS wrote:
Show quoteHide quote
> To utilise the Word interopt libraries you need to give the process
> permission to load the word application:
> Open Component Services
>
> goto Component Services\Computers\My Computer\DCOM Config\
>
> right click on Microsoft Word Document and choose properties.
>
> On the security tab choose customise for the Lauch and Activation
> Permissions and click edit.
>
> Add the permissions for your application process (normally [machine
> name]\aspnet for web sites).
>
> Hope this helps,
> Garth.
>
> "funkebu***@gmail.com" wrote:
>
> > I am hosting a C# UserControl in IE that attempts to automate Microsoft
> > Word.  When opening Word I get an Error:
> > System.Security.Permissions.SecurityPermission.  How can I give my
> > control permission to open Word?
> >
> >