.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Extract Word document & Convert those extracted pages to images using Microsoft.Office.Interop.Word

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :ASP.Net
You cannot vote on your own post 
Hi Everyone.

I need to extract word document into number of pages and convert those pages into images by using Microsoft.Office.Interop.Word, can anybody tell me how i can do this?

View Complete Post

More Related Resource Links

How to use Microsoft.office interop.word in website

Hi, I have a page which creates a word doc from templet string location = Server.MapPath("~/temp/" + filename); Application app = new Application(); Document doc = app.Documents.Add(location); if(doc != null) { //Some code here } it works fine when i run from visual studio, but when i deploy it as a website in local IIS, its not working.I gave the permissions needed to access the folders in the website. What should i do to make it work. Thanks

saving docx as pdf with Microsoft.Office.Interop.Word in sharepoint

Hi!Im trying to export my docx file to PDF with Microsoft.Office.Interop.Word but im stuck. Anyone with some great ideas that could save my day.The code that im running is working fine localy but i can´t get it to work in sharepoint.The most commin exception is file not found (the same path is working fine localy)...Pls give me a hint!

Does Microsoft.Office.Interop.Word Requires MS OFFICE Installation???


Hi Team,

I'm developing an application in WPF which generates a WINWORD for that I'm Using

Microsoft.Office.Interop.Word dll but is it Manditory to have MS OFFICE installed to work dll ???

Please, Answer my query

Thanks in Advance

Advanced Basics: Setting Word Document Properties the Office 2007 Way


The last time I wrote this column (March 2006), I shared an application that allows you to update all the Microsoft® Word documents in a folder and its subfolders. Each time the application finds a document in the specified path, it updates the document properties to match those you specified in the application.

Ken Getz

MSDN Magazine June 2006

Replace Text in textbox in word document using interop and asp.net

Hi all,  I'm trying to create a function to replace fields in a word document using asp.net. The fields are marked in the document using ###field### and I need to replace them with the data from the DB. The code I have works fine for the body of the word document but doesn't appear to work if the text is contained within a textbox, is there a way to correct this? Here's the code I am currently using Dim Contract as string Dim word As New Word.Application        Dim doc As Word.Document        Try            word.Documents.Open("c:\FYI.doc")            word.Visible = True             doc = word.ActiveDocument            Dim myStoryRange As Microsoft.Office.Interop.Word.Range            For Each myStoryRange In doc.StoryRanges                With myStoryRange.Find                    .Text = "###field###&quo

SharePoint 2010 Office Web Apps "Word Web App cannot open this document for viewing because of an un

<label id="message" class="WACStandardDialogLabel">I have provisioned a SharePoint 2010 Server (RTM: 14.0.4762.1000)  with Office Web Apps.</label> <label class="WACStandardDialogLabel">It is a single server with a separate SQl 2008 Standard server.</label> <label class="WACStandardDialogLabel">I have seen that there were some issues in site that were configured with a port.  The Web Application I am having issues with is running on a port  and is extended on 443 as well.</label> <label class="WACStandardDialogLabel">I can view PPTX but Word docx files can't be viewed.  The word docx files howerver can be edited in the browser.</label> <label class="WACStandardDialogLabel">I get the following error when I try to view a word file in the browser:</label> <label class="WACStandardDialogLabel"></label> "Word Web App cannot open this document for viewing because of an unexpected error. To view this document, open it in Microsoft Word. Error Id: 7f644fec-c2d7-4387-b280-31a4647afea1, 20100509213834 " I am seeing an error in the event log that identifies the Application Service account (that includes the Word Viewer Service) can't access the portal site collection database.  -I am using the appl

Document is read-only in SharePoint, but user sees "check out" option in Office 2007 / Word / Excel

I am finding that when there is a document library in SharePoint with checkin/checkout required, if a user with read-only ("Visitor") permissions opens a document from that library, the document will open as read-only in Word, Excel, etc., but the user will see the "Server Document" bar with the message "To modify this document, you must check it out" and the "check out" button.  When the user tries to check the document out, they are asked to authenticate, and then receive the error "Cannot perform this operation.  The file has been deleted or someone else has it checked out."    How is it possible to prevent a user with read-only rights in SharePoint from seeing the "Check out" option in Word or Excel?

ItemAdded fails after Microsoft.Office.Word.Server.Conversions.ConversionJob was completed

Hey, I defined a ConversionJob from doc to pdf inside and the doc-file is located in a  document library and the job goes through without any problems. The pdf is created as expected. However if I try to catch an ItemAdded event the debugger starts every time the ConversionJob is finished and if I agree to debug the problem the debugger proceeds after the first time I hit F10 no matter how much code is located in the eventreceiver. The "error" seems to occur in the first line of my event receiver no matter what's in that line. If I got something like "string test = "text";" the debugger will come up anyway. I'm really confused by this behaviour and I hope somebody has worked with ConversionJobs from Word Automation Services before.

How to open and read Word content using Open XML SDK 2.0 for Microsoft Office?

Hello, I've built a component to read a Word Document and open it in silverlight, so I'm interested in Open XML SDK 2.0 for Microsoft Office, I read the document about this and some several examples, they're just talk about read the Headers, Comment,...and also I want to read the Word content.   Please help me, thank you.

How to disable "Edit in browser" and "Edit in Microsoft Office word" From Name hoverMenu?



I need to disable the "Edit in browser" and "Edit in Microsoft Office Word" for a certain project.

It's inside the name hover menu. 

Any suggestions and ideas will be great.




Charset Problem with dynamically generated Word Document


in my asp.net web application i am dynamically generating a word documnet out of a sql data. I have set the char set UTF-8 during the doument creation in code but still when i open the generated document and check it char set .. it is always windows-1252 not the one that i have set. My sql data in the document have special characters whihc can only be understandable using the UTF-8 charset otherwise its always ?T written in place of an apostrophy . Pasting my code here..

         HttpContext.Current.Response.ContentType = "application/msword";
         HttpContext.Current.Response.ContentEncoding = System.Text.UnicodeEncoding.UTF8;
         HttpContext.Current.Response.Charset = "utf-8";
         string strFileName = "Details" + ".doc";
        HttpContext.Current.Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
        StringBuilder strHTMLContent = new StringBuilder();
        string strMessage = " ";
        DataView abstractview = (DataView)dsAbstract.Select(DataSourceSelectArguments.Empty);
        foreach (DataRowView row1 in abstractview)
            strMessage += "<table border='1' cellspacing='0' cellpadding='5' width

Embed word document inside excel



I am using ASP.NET and C# 2.0 and working on web application.

I want to embed a word document inside a excel sheet.

How to embed word document inside excel.

Thank you



Office Services: Merging Word Documents on the Server Side with SharePoint 2010


Office 2010 and SharePoint 2010 include a new set of components called Application Services. These put a rich set of tools in a developer's bag for Office automation. We'll show you how to use Office OpenXML, Word Automation Services and SharePoint to build a simple application that merges separate status reports into a single document.

Manvir Singh, Ankush Bhatia

MSDN Magazine July 2010

Office Space: From VBA Macro to Word Add-in


See how to use Word to capture a VBA macro and use Visual Studio Tools for Office to wrap it up into a deployable Word add-in.

Robert Bogue

MSDN Magazine May 2008

OFFICE UI: New VSTO Features Help You Customize Word And Outlook


See how to use Microsoft Visual Studio Tools for the Microsoft Office System to build powerful custom applications against the 2007 Microsoft Office system.

Steve Fox and Paul Stubbs

MSDN Magazine June 2007

Advanced Basics: Set Word Document Properties Programmatically


At the beginning of another lovely day of writing courseware in mad pursuit of unrealistic deadlines, I received a frantic call from a business partner. He was at the end of a long consulting project and had several hundred Microsoft® Word documents, all of which required their document properties to be set identically, except the Title property of the document, which was to be based on the document file name, minus the .

Ken Getz

MSDN Magazine March 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend