convert doc to gif image

Asked By raymond hsu
20-Nov-09 05:05 AM
Earn up to 0 extra points for answering this tough question.
Hi,

I wanted to develop an application which can  generate images (GIFs) of microsoft documents(like
doc, docx, xls).

Thanks,
Raymond

  Re:

Venkat K replied to raymond hsu
20-Nov-09 05:44 AM

You can download these components to convert doc to gif.

http://shareware.software.informer.com/download-shareware-convert-word-doc-to-gif/

Thanks,

  check this

Jack jack replied to raymond hsu
20-Nov-09 06:27 AM

using System;


using System.Collections.Generic;


using System.ComponentModel;


using System.Data;


using System.Drawing;


using System.Text;


using System.Windows.Forms;


using Nevron.UI.WinForm.Controls;


using Office = Microsoft.Office.Core;


using Word = Microsoft.Office.Interop.Word;


using System.Drawing.Imaging;


 


namespace UITest


{


    public partial class Form1 : Form


    {


        public Form1()


        {


            InitializeComponent();


        }


 


        private void Form1_Load(object sender, EventArgs e)


        {


 


        }


 


        private void button1_Click(object sender, EventArgs e)


        {


            object oMissing = System.Reflection.Missing.Value;


            object oTrue = true;


            object oFalse = false;


 


            Word.Application wdApp = null;


 


            // Start a new Word instance if necessary


            if (wdApp == null)


                wdApp = new Word.ApplicationClass();


 


            // Create a new document


            Word.Document wdDoc = wdApp.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);


            wdApp.Selection.InlineShapes.AddPicture("c:\\background.gif", ref oMissing, ref oTrue, ref oMissing);


            object oFileName = "c:\\image.doc";


 


            wdDoc.SaveAs(ref oFileName, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,


                ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,


                ref oMissing, ref oMissing, ref oMissing);


 


            wdApp.Quit(ref oFalse, ref oMissing, ref oMissing);


 


        }


    }


}

  Converting Doc or Xls file to GIF

Chandan Dey replied to Jack jack
10-Dec-09 03:12 AM
Hi Jack,
Your example is very helpfull for me.

But is there any way to convert doc/xls/docx to gif with C# programmetically as per your example.

Please help me asap.

Thanks.
Chandan
  re: check this
senthil replied to Jack jack
27-Apr-10 11:28 AM
I want vice versa functionality. convert Microsoft word into image file..  is it possible without using third party tools ?
Thanks for your help
  re: convert doc to gif image
himanshi replied to raymond hsu
11-Jul-11 03:28 PM
hey i'm facing the same problem..searching for the solution for the past 3 weeks.plzz mail me the solution if you get one...it's really imprtant 4 me.
thanx
  re: convert doc to gif image
himanshi replied to raymond hsu
11-Jul-11 03:37 PM
hey i'm facing the same problem..searching for the solution for the past 3 weeks.plzz mail me the solution if you get one...it's really imprtant 4 me.
thanx
  re: convert doc to gif image
Shahzad Latif replied to raymond hsu
18-Nov-11 12:27 AM
Hi Raymond,

You may try using Aspose file format components for .NET which can help you convert Microsoft Office, PDF, and other documents to images very easily. These components are simple .NET assemblies which do not require MS Office, Adobe Acrobat or any other software to be installed on the development or deployment machines. It can work with any type of .NET application on 32-bit/64-bit systems. Please see the following blog post for further details on converting DOC/XLS/PPT/PDF and other file formats to images:

Convert Microsoft Office documents and other file formats to images in .NET applications

Disclosure: I work as a developer evangelist at Aspose.
Create New Account