You need to connect to some office application via ole (say, to word), what do we do in this case? It's simple, put the CreateOleObject('Word.Application')
expression into the variable of the Variant
type and continue on. But it only seems so. It does not recognize the CreateOleObject
procedure, it safely gives an error - the compilation is interrupted. Now we climb into Delphi 7 we open the project created in Delphi XE ... after a short swearing (short, because the project is an empty form) the program will CreateOleObject
safely, CreateOleObject
works fine. But we don’t stop there - again we climb into Delphi XE, open the recompiled project - and again everything is great. No new modules are connected, what is happening is not clear.
That is, in the end everything works, but surely this could be achieved by other methods. I would like to know what I am doing wrong and what to do. OS - Windows 7 Ultimate x64 (if that matters).