TIP: Click on subject to list as thread! ANSI
echo: delphi
to: MARK TUCKER
from: SIMON HUGGINS
date: 1997-07-04 19:06:00
subject: Visual basic vs. Delphi

Hi Mark,
On Monday, 30 June 1997 at 18:46:00, Mark Tucker confused me
talking about: Visual basic vs. Delphi to Simon Huggins
 SS>> Can anybody give me the 3 best reasons, NOT to use
 SS>> VB, but to use Delphi instead ?
 MT> I've got an additional question about Delphi vs. Visual
 MT> Basic: Does Delphi allow you to automate functions of
 MT> applications such as MS office in the same manner as VB?
I've never tried with either ;)
How do you mean automate their functions?
Ah!
after having a quick look at PCW (buy it) ;) there is an example here
[which is completely untested by moi ;)]
so yes ;)
try this (but then I don't suppose you've got delphi yet?? It wasn't you
asked the original q though. Hmmm)
var
excelobj:variant; {Yuck it's a variant. Urggh VB urrghgh SPIT}
rangeobj:variant; {oh no another one}
begin
Excelobj := createOleObject('Excel.Application');
Excelobj.visible:=true;
Excelobj.workbooks.open('C:\Test.XLS');
Rangeobj:=excelobj.range ('B2:B4')
etc.
etc.
OK, just tested it. It works ;) That's in Delphi 2 with Office 95.
Don't forget to put OleAuto in your uses clause.
I've never used VB to control Office.
It does seem quite slow but that is probably more due to the OLE stuff than
Delphi
Hope that helps
bfn,
si.
Fido: 2:440/7.15       *** SEE IT. LIVE IT. BE IT.      TREK_RANKS_UK ***
Internet: huggie@dial.pipex.com
Web: http://ds.dial.pipex.com/huggie
.!. An optimist is someone who has never had much experience.
--- Terminate 4.00/Pro
---------------
* Origin: Fou, con et anglais! (2:440/7.15)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.