Click here to Skip to main content
15,897,518 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
string ResumeName="Resume@123.doc"; This name store in SolutionExplorer inside Resume folder.

Now I want to open this resume by button click. Please help me...
Posted
Comments
kornakar 27-Aug-12 6:00am    
What solutions have you tried? Do you need help on a specific problem?

Please go through this link
http://forums.asp.net/t/1444006.aspx
 
Share this answer
 
Hello,


Use the Process class. (in System.Diagnostics)

Process.Start(ResumeName)

This will fire up the default handler for word documents and open your file in it.

As you are using ASP.Net you need to:
- Give permission for ASP.NET worker process account (<localmachine>\ASPNET) to interact with desktop or allow ASP.NET worker process to run in SYSTEM account.
- Enable IIS Admin Service to interact with desktop

(http://support.microsoft.com/kb/555134[^])

Valery.
 
Share this answer
 
HI please can u try Below COde

Refer Microsoft.Office.Interop.Word.dll and Office.dll from Add Reference MEthond

C#
using System.Runtime.InteropServices;
using Word = Microsoft.Office.Interop.Word;


C#
public Word.Document document;

    public static Word.ApplicationClass wd = null;
    public  static int wordWnd              = 0;
    private static string filename          = null;


C#
object fileName = filename;
object newTemplate = false;
object docType = 0;
object readOnly = true;
object isVisible = true;
object missing = System.Reflection.Missing.Value;


document = wd.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible);
C#
wd.Visible = true;
                    wd.Activate();



Vijay
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900