C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » .NET »

C# .NET+open word application problem+The RPC server is unavailable. (Exception from HRESU


Posted Date: 03 Dec 2008      Posted By: radhika bista      Member Level: Gold     Points: 1   Responses: 0



hi,
my code is like this:





object fileName = b.Name;

object readOnly = false;
object isVisible = true;
object missing = System.Reflection.Missing.Value;
try
{
wordAPP.Visible = true;

Word.Document aDoc = wordAPP.Documents.Open(ref fileName, ref missing, ref readOnly, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);

aDoc.Activate();
}
catch (Exception e1)
{
MessageBox.Show(e1.ToString());
}
i tried many options but still not successful.





This problem doesnot exist when we try to open a word file for first time as a open word application is closed and tried to open same or different document in word this happens.
As long as word is open we can simply open any files any time .



thanks






Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Post Reply
You must Sign In to post a response.
Next : Ajax Filtered TextBox Extender
Previous : password
Return to Discussion Forum
Post New Message
Category: .NET

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use