Solved

MS OFFICE

Posted on 2000-02-18
11
217 Views
Last Modified: 2010-04-04
HI,
I search free components and sources to make report db, master/detail etc. from delphi DB to MS Offcie (Word&Excel).
Also i search more info for excel8.olb and msword8.olb can someone help me?
regards
0
Comment
Question by:darkloser
  • 6
  • 5
11 Comments
 
LVL 2

Expert Comment

by:florisb
ID: 2550866
I used them both to be able to automate Word & Excel from Delphi. I expect you know about importing them or viewing them in the type library editor>

If you know what you want, recording macro's in Excel or Word and translating them works fine.

I don't mind to post sample code.

Floris.
0
 
LVL 1

Author Comment

by:darkloser
ID: 2555748
Adjusted points to 10
0
 
LVL 1

Author Comment

by:darkloser
ID: 2555749
Heh, yes i think i know but after import of library i have a problem with my code :)) i use it on delphi3 c/s
Can someone send me a sample sources for delphi3 ?
best regards
0
 
LVL 2

Expert Comment

by:florisb
ID: 2557253
after import, include this _tlb and ComObj in your uses list.

Define a global:
MyWord: _Application;
create Word instanc:
MyWord := CoApplication.Create;

And use it, f.e.
Show:
MyWord.Visible := True;
hndl := FindWindow(PChar('OpusApp'), nil);
if hndl <> 0 then
  ShowWindow(hndl, SW_MAXIMIZE);

Now you can call all kind of functionality from the tlb with MyWord.xxxx

Floris.










0
 
LVL 1

Author Comment

by:darkloser
ID: 2557862
Thanks,
this not work again :)
I'm using delphi3 c/s and MSOffice97.
Can u send me a demo?
May be i'm wrong some code, i can't find err.
Thanks
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Expert Comment

by:florisb
ID: 2557959
Aha, 97, then this should work:

FWord70: OLEVariant;
FWord70 := CreateOleObject('Word.Basic');

Do tell me what doesn't work if it doesn't, what went wrong with the previous one?

Excell, import type lib, include it and include ComObj.
var
FExcel: _Application = nil;

FExcel := CoApplication.Create;
FExcel.Visible[0] := True;
after which the complicated part starts.

If you first try whether you can create instances of Word / Excell with the code I posted (THAT IS POSSIBLE!), then we'll see further. I would like more points if we continue...

Floris.


0
 
LVL 2

Expert Comment

by:florisb
ID: 2586763

And....?
0
 
LVL 1

Author Comment

by:darkloser
ID: 2587062
Thank's i find all that i need from site of borland info&sources.
I'll give u points than u want but pls send me a sources :). I wanna just see on it.
regards
0
 
LVL 2

Accepted Solution

by:
florisb earned 216 total points
ID: 2591885
Hi Darkloser,

Did you manage allready? The source I posted here should be sufficient...

Sorry, but please increase points if you want me to send you some demo-stuff I made. Do post your emailadres then.

Greetings,
Floris.
0
 
LVL 1

Author Comment

by:darkloser
ID: 2593395
darkloser@yahoo.com
rado@total-air.einet.bg

Also if u wanna i can send u demo too :)
Send me mail and write how points u want
i have just 300 points but i'll give .
Pls write email :)

best regards
DARKLOSER
0
 
LVL 1

Author Comment

by:darkloser
ID: 2595996
Adjusted points to 216
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now