arieldri
asked on
how to view a Word document with all the graphics inside in my delphi form?
i tried RTF but i cant see the pictures or the arrows i need in my text
maybe ill save word pages as JPG files, but its a lot of work to do, 200 pages.
maybe using ACTIVEX or OLE but i dont know anything about it and i would like to have a demo if possible
i must say that i want to see the word document in my delphi form even if microsoft office must be installed to do so, so maybe we use some office DLLs, OCXs or something :)
if u have a solution to do this using C# i will also be happy!!!
10x
maybe ill save word pages as JPG files, but its a lot of work to do, 200 pages.
maybe using ACTIVEX or OLE but i dont know anything about it and i would like to have a demo if possible
i must say that i want to see the word document in my delphi form even if microsoft office must be installed to do so, so maybe we use some office DLLs, OCXs or something :)
if u have a solution to do this using C# i will also be happy!!!
10x
Oh, I've got an idea, don't know if it'll work...
Just drop a TWebBrowser onto your form and call something like:
WebBrowser1.Navigate('file ://C:\Docu ments and Settings\you\My Documents\whatever.doc');
Seems to work for me, but the computer on which you show this will have to have Office Word installed.
Just drop a TWebBrowser onto your form and call something like:
WebBrowser1.Navigate('file
Seems to work for me, but the computer on which you show this will have to have Office Word installed.
Have any questions, don't hesitate!
Have a nice day arieldri :-)
Have a nice day arieldri :-)
Or... if you don't have a too complex format, save your word document in HTML and show it the same way I've shown you above with TWebBrowser. You'll have images, text, format and it'll be compatible almost everywhere, having Word or not.
By the way, TWebBrowser is available in the Internet tab of Delphi 6 and 7 if I remember. Not sure if the one provided with D5 is okay for this purpose. What version do you use?
ASKER
thank you a lot loop until, ill try your option soon
i have delphi 7, see ya :)
i have delphi 7, see ya :)
Ok, hope it'll work for you :-))
Hi,
Try TOLEContainer component placed on a form. Open the file this way:
OLEContainer1.CreateObject FromFile(F ileName, False);
Also set:
OLEContainer1.AutoActivate := aaGetFocus;
Regards, Geo
Try TOLEContainer component placed on a form. Open the file this way:
OLEContainer1.CreateObject
Also set:
OLEContainer1.AutoActivate
Regards, Geo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very good!!! the browser option seems good for me
the ole container is problematic bause it shows word toolbars.
thank u very much all!
the ole container is problematic bause it shows word toolbars.
thank u very much all!
Thanks for the points arieldri!
Happy it worked for you! :-)
Happy it worked for you! :-)
--- begin quote from MBo ---
I used RXRichEdit from RXLib because it can show pictures.
Save Word document as RTF.
uses ...richedit;
procedure TForm1.Button1Click(Sender
var b:tbitmap;
fr: TFormatRange;
r: TRect;
begin
rxrichedit1.Lines.LoadFrom
b:=tbitmap.create;
b.width:=rxrichedit1.width
b.height:=rxrichedit1.heig
r:=rect(0,0,RXRichEdit1.Wi
RXRichEdit1.Height*screen.
fr.hdc:=b.Canvas.handle;
fr.hdctarget:=b.Canvas.han
fr.rc:=r;
fr.rcpage:=r;
fr.chrg.cpMin:=0;
fr.chrg.cpMax:=-1;
Sendmessage(RXRichEdit1.ha
image1.Picture.assign(b);/
b.savetofile('e:\wwe.bmp')
b.free;
end;
--- end quote ---
I'll try to find better thought.