Reputation: 1
I'm using Delphi 10.3.3 and wrote an application about 4 months ago which used a third party Word Mailmerge unit. It said that I must include ComObj
and ActiveX
in uses
, which I did. The application ran fine.
I've returned to it today to make changes and have errors, cannot resolve unit name for ComObj
and ActiveX
. I got around ComObj
by changing it to System.Win.ComObj
, which I read elsewhere on here, but cannot get around the ActiveX
issue. Not sure why this is happening.
Have I changed something by accident? It was working before. I'm hesitant to start re-installing libraries without understanding the issue.
Upvotes: 0
Views: 487
Reputation: 11
You must use WinAPI.ActiveX
instead of ActiveX
and WinAPI.ShellAPI
instead of ShellAPI
.
Upvotes: 1
Reputation: 12292
Probably your project has his option "Unit scope names" either empty or incomplete. That's why you have to include fully qualified unit names in the uses clause. There is no problem doing that. It is even better.
Usually the option "unit scope names" is Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;System;Xml;Data;Datasnap;Web;Soap
You can complete the list with whatever you need. Or leave it empty and use fully qualified unit names.
Upvotes: 2