Solved

MS OFFICE

Posted on 2000-02-18
11
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

739 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