473,788 Members | 2,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Word cannot fire evetn error from asp.net/C#

The following code hangs or gives me a "can not fire event" message

The code works from a windows app.
Fails in ASP.NET on the word.open call

I have done the following:

How to configure Office applications to run under a specific user account
http://support.microsoft.com/defaul...b;en-us;Q288367

Before doing the above the cod use to get an access denied on the
new word.applicatio n();
oWordApplic = new Word.Applicatio n();
object fileName = "filename.d oc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflecti on.Missing.Valu e;

// hangs here or returns cant fire event msg
oDoc = oWordApplic.Doc uments.Open(ref fileName, ref missing,ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing
,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref missing,
ref missing);

Any ideas?, I have not found anything to help me yet.

Nov 19 '05 #1
4 1613
Did you include System.Reflecti on in your namespaces ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"mcasey329" <mc*******@disc ussions.microso ft.com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
The following code hangs or gives me a "can not fire event" message

The code works from a windows app.
Fails in ASP.NET on the word.open call

I have done the following:

How to configure Office applications to run under a specific user account
http://support.microsoft.com/defaul...b;en-us;Q288367

Before doing the above the cod use to get an access denied on the
new word.applicatio n();
oWordApplic = new Word.Applicatio n();
object fileName = "filename.d oc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflecti on.Missing.Valu e;

// hangs here or returns cant fire event msg
oDoc = oWordApplic.Doc uments.Open(ref fileName, ref missing,ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref
missing
,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref
missing,
ref missing);

Any ideas?, I have not found anything to help me yet.

Nov 19 '05 #2
No, I was not,
I added it and it still did not work.

"Juan T. Llibre" wrote:
Did you include System.Reflecti on in your namespaces ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"mcasey329" <mc*******@disc ussions.microso ft.com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
The following code hangs or gives me a "can not fire event" message

The code works from a windows app.
Fails in ASP.NET on the word.open call

I have done the following:

How to configure Office applications to run under a specific user account
http://support.microsoft.com/defaul...b;en-us;Q288367

Before doing the above the cod use to get an access denied on the
new word.applicatio n();
oWordApplic = new Word.Applicatio n();
object fileName = "filename.d oc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflecti on.Missing.Valu e;

// hangs here or returns cant fire event msg
oDoc = oWordApplic.Doc uments.Open(ref fileName, ref missing,ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref
missing
,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref
missing,
ref missing);

Any ideas?, I have not found anything to help me yet.


Nov 19 '05 #3
Are you trying to run Word at your server,
but expect an internet user to use it ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"mcasey329" <mc*******@disc ussions.microso ft.com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
No, I was not,
I added it and it still did not work. "Juan T. Llibre" wrote:

Did you include System.Reflecti on in your namespaces ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"mcasey329" <mc*******@disc ussions.microso ft.com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
> The following code hangs or gives me a "can not fire event" message
>
> The code works from a windows app.
> Fails in ASP.NET on the word.open call
>
> I have done the following:
>
> How to configure Office applications to run under a specific user
> account
> http://support.microsoft.com/defaul...b;en-us;Q288367
>
> Before doing the above the cod use to get an access denied on the
> new word.applicatio n();
>
>
> oWordApplic = new Word.Applicatio n();
> object fileName = "filename.d oc";
> object readOnly = false;
> object isVisible = true;
> object missing = System.Reflecti on.Missing.Valu e;
>
> // hangs here or returns cant fire event msg
> oDoc = oWordApplic.Doc uments.Open(ref fileName, ref missing,ref
> readOnly,
> ref missing, ref missing, ref missing, ref missing, ref missing, ref
> missing
> ,
> ref missing, ref missing, ref isVisible,ref missing,ref missing,ref
> missing,
> ref missing);
>
> Any ideas?, I have not found anything to help me yet.

Nov 19 '05 #4
While you followed the instruction on Q288367 to configure Office apps to
run under specific user, did you accually configure the user account for
ASP.NET apps, i.e. ASPNET or NETWORK SERVICE(Win2003 )? In that article,
IUser_[MachineName] account is mentioned, but this account is not the
account that runs ASP.NET apps by default, unless the ASP.NET app is
configured to use <impersonate="t rue"> and allows anonimous access.

"mcasey329" <mc*******@disc ussions.microso ft.com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
The following code hangs or gives me a "can not fire event" message

The code works from a windows app.
Fails in ASP.NET on the word.open call

I have done the following:

How to configure Office applications to run under a specific user account
http://support.microsoft.com/defaul...b;en-us;Q288367

Before doing the above the cod use to get an access denied on the
new word.applicatio n();
oWordApplic = new Word.Applicatio n();
object fileName = "filename.d oc";
object readOnly = false;
object isVisible = true;
object missing = System.Reflecti on.Missing.Valu e;

// hangs here or returns cant fire event msg
oDoc = oWordApplic.Doc uments.Open(ref fileName, ref missing,ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing ,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref missing, ref missing);

Any ideas?, I have not found anything to help me yet.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2695
by: Fly Girl | last post by:
Gurus needed! I'm trying to use a Word class object in order to capture events in Word. Here's what I have, but the event code appWord_BeforeDocumentSave... doesn't ever fire. In a Class Module +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Public WithEvents appWord As Word.Application Public WithEvents docWord As Word.Document Public Sub appWord_DocumentBeforeSave(ByVal Doc As Word.Document,
3
5815
by: Andy Davis | last post by:
How do i or can I open a word document directly from Access? I would like to be able for the user to click a button on my form to open a word document and then also run a macro in Word. Thanks in advance
5
2178
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1. Create a new C# ASP.NET web application named "demo" and modify Session_Start in Global.asax.cs as follows: protected void Session_Start(Object sender, EventArgs e) { Response.Write("Session_Start event fired at "+
8
7519
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the same words but in jumbled order they should match and print only the dissimilar lines.The program also checks for multiple entries of the same line. Here file 2 converts to file 3 which is in the format of file1 and i compare file1 with file3.
7
10964
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed this screen below. Please help, thanks in advance... Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify...
0
1604
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the reference and it works, however when I add the reference the application can't find it. Not sure why it says the system cannot find the file when it exists in that location? Please help, thanks in advance... GOAL ===========================
1
15961
by: R Reyes | last post by:
ISSUE (reposted) =========================== Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? For many people, they say they add the reference and it works, however when I add the reference the application can't find it. Not sure why it says the system cannot find the file when it exists in that location? Please help, thanks in advance... GOAL ===========================
6
10298
by: MayBoy | last post by:
Hi There I am trying to use the Goto method of the Word ActiveX object. I am trying to open a document and go to a named bookmark. If I use this code in VB it works, so I'm sure the approach is possible, I just can't get JavaScript to work with it. Here is the code I am using, the error I get from IE is Object Expected: Hope someone can help! Any help would be much appreciated
4
12443
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.