Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 19th, 2004, 09:14 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 128
Thanks: 0
Thanked 0 Times in 0 Posts
Default Export to word document

Hi
I already asked the same query in ASP but now my requirement is in .Net.
I have to display the records in the form of label and then i have to export the same page to word document for printing purpose.
Can anyone reply me as its a urgent work assigned to me, plz reply asap.

Regards
Lily

 
Old November 23rd, 2004, 06:30 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 140
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ms-help://MS.MSDNQTR.2004APR.1033/odc_vsto2003_ta/html/WordObject.htm
Hope it hepls u

 
Old July 30th, 2013, 04:44 AM
Registered User
 
Join Date: Jul 2013
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, you can try this .NET Word dll.
Here is a hello world sample how you can create and write Word file in C#:
Code:
// Create a new empty document.
var document = new DocumentModel();

// Add document content.
document.Sections.Add(
    new Section(document,
        new Paragraph(document, "Hello world!")));

// Save the document to a file.
document.Save("Document.docx");
Also you can easily print word in C# like this:
Code:
// Print Word file (DOCX) to the default printer.
DocumentModel.Load("Document.docx").Print();





Similar Threads
Thread Thread Starter Forum Replies Last Post
export to word Komila ASP.NET 1.0 and 1.1 Professional 3 July 19th, 2013 04:39 AM
Protect a Word document zengfu Excel VBA 1 March 28th, 2005 11:00 AM
Export Recordset to Word Document blackdevil1979 VB How-To 0 September 2nd, 2004 03:54 AM
ASP - Word Document mapaquin Classic ASP Professional 1 August 11th, 2003 06:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.