Click here to Skip to main content
15,916,030 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How I can Convert one Color to Another Color Pin
Gary Stafford23-Jun-09 16:22
Gary Stafford23-Jun-09 16:22 
QuestionHelp in tool tip alignment in Gridview Pin
www.Developerof.NET19-Jun-09 22:00
www.Developerof.NET19-Jun-09 22:00 
QuestionGenerate word document from web form Pin
Hemant Thaker18-Jun-09 23:12
Hemant Thaker18-Jun-09 23:12 
AnswerRe: Generate word document from web form Pin
Not Active19-Jun-09 2:44
mentorNot Active19-Jun-09 2:44 
GeneralRe: Generate word document from web form Pin
Hemant Thaker19-Jun-09 4:37
Hemant Thaker19-Jun-09 4:37 
GeneralRe: Generate word document from web form Pin
Not Active19-Jun-09 5:08
mentorNot Active19-Jun-09 5:08 
QuestionRe: Generate word document from web form Pin
led mike19-Jun-09 5:18
led mike19-Jun-09 5:18 
QuestionRe: Generate word document from web form Pin
Hemant Thaker19-Jun-09 23:17
Hemant Thaker19-Jun-09 23:17 
Hi...thanks for your support
See this is my code..
///////////////////
using Microsoft.Office.Interop.Word ;

ApplicationClass oWordApp = new ApplicationClass();
object fileName = "c:\\myfile.doc";

object missing = System.Reflection.Missing.Value;
Document oWordDoc = oWordApp.Documents.Add(ref missing,
ref missing, ref missing, ref missing);

oWordDoc.Activate();

oWordApp.Selection.TypeText("This is the text");
oWordApp.Selection.TypeParagraph();
oWordDoc.SaveAs(ref fileName, 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, ref missing, ref missing);

oWordApp.Application.Quit(ref missing, ref missing, ref missing);
/////////////////////////////////

I am using MS Word 2003, I have added reference of COM --> Microsoft word object library 11.0
Please tell me if i go wrong with this code..

thanks
Hemant

By:
Hemant Thaker

AnswerRe: Generate word document from web form Pin
Not Active20-Jun-09 4:07
mentorNot Active20-Jun-09 4:07 
AnswerRe: Generate word document from web form [modified] Pin
Gary Stafford21-Jun-09 8:38
Gary Stafford21-Jun-09 8:38 
QuestionRe: Generate word document from web form Pin
Hemant Thaker21-Jun-09 23:41
Hemant Thaker21-Jun-09 23:41 
QuestionRe: Create Header in word document dynamically Pin
Hemant Thaker23-Jun-09 3:30
Hemant Thaker23-Jun-09 3:30 
AnswerRe: Create Header in word document dynamically Pin
Gary Stafford23-Jun-09 12:56
Gary Stafford23-Jun-09 12:56 
GeneralRe: Create Header in word document dynamically Pin
Hemant Thaker26-Jun-09 23:55
Hemant Thaker26-Jun-09 23:55 
QuestionData Scrapping in Asp.net Pin
ravi.vellanky18-Jun-09 21:12
ravi.vellanky18-Jun-09 21:12 
AnswerRe: Data Scrapping in Asp.net Pin
Not Active19-Jun-09 2:41
mentorNot Active19-Jun-09 2:41 
QuestionJquery Validation plugin in Ajax Update Panel Pin
sagnik mukherjee18-Jun-09 8:41
sagnik mukherjee18-Jun-09 8:41 
QuestionSourceCode for Sharing My Website on Social Networking Sites Pin
mshen0118-Jun-09 4:44
mshen0118-Jun-09 4:44 
AnswerRe: SourceCode for Sharing My Website on Social Networking Sites Pin
Aman Bhullar18-Jun-09 19:44
Aman Bhullar18-Jun-09 19:44 
QuestionUse same objects to access DB and WebService Pin
the_jat18-Jun-09 3:55
the_jat18-Jun-09 3:55 
AnswerCross Posted Pin
led mike18-Jun-09 4:46
led mike18-Jun-09 4:46 
GeneralRe: Cross Posted Pin
the_jat18-Jun-09 4:53
the_jat18-Jun-09 4:53 
GeneralRe: Cross Posted Pin
led mike18-Jun-09 5:17
led mike18-Jun-09 5:17 
GeneralRe: Cross Posted Pin
the_jat18-Jun-09 19:04
the_jat18-Jun-09 19:04 
GeneralRe: Cross Posted Pin
led mike19-Jun-09 5:19
led mike19-Jun-09 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.