Link to home
Start Free TrialLog in
Avatar of Aziz_xxx_Habbib
Aziz_xxx_Habbib

asked on

Convert MS-Word Doc Into Image

Hi everybody

I was wandering if anyone could help?, I have created a word document AND I want to convert this document intointo any type of image's

(try
           to convert using OLE
 else
           any else method)

Please Help me!!!!

Thank you very much



Avatar of odissey1
odissey1

Hi Aziz_xxx_Habbib,

1. Do you want to export just just first page or multiple pages?
2. Do you create *.doc programmatically? How? Could it be easyer to export image directly (without Word)?

Regards,
odissey1
why don't you convert it to pdf & then to bmp !
Avatar of Aziz_xxx_Habbib

ASKER

Hi Mr.Odissey1

1. I want to export both method (first or multiple pages).....

2. I create *.doc using MS-Word but I want to export it to image using Delphi



Regards,
Aziz_xxx_Habbib

ASKER CERTIFIED SOLUTION
Avatar of Sergio_Hdez
Sergio_Hdez

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry, I used something in this code I didn't explained:

  while ShowEstado(false) <> 'Loaded' do
    Application.ProcessMessages;

Should be changed to:

while (Ole.State <> osLoaded) do
    Application.ProcessMessages;

Sorry!
kretzschmar, may be the error comes from the fact that you are free to open ANY document, while this code assumes you have opened a Word doc, so if you opened a bitmap or other type of doc, then the ole server used to open it -word in the expected type of doc- may not know what to do with the command where your error raised.

For instance, having OpenOffice instaled may lead to opening the doc in this program instead of Word, and OpenOffice will not know what to do with Ole.OleObject.ActiveDocument.ActiveWindow.View.Type = 4; as ActiveDocument may not be in its exported interface -sure it is not-.

Anyway, may be I misswrote something, but my original code I didn to try the solution worked ok. May be an older version of word don't understand tis command... I got this command by recording a macro in word in witch I changed view to preview mode, then looke at the code generated, and the constant used resulted to be 4, so I changed it to 4 in the delphi code.