I've come to grief over duplicate ProgD & IID definitions due to including PB COM Browser *.inc files (oWord.inc and oExcel.inc) for both Word and Excel in the same application. This wasn't a problem with PB 7 & 8 but I hate to say its a problem now. I'm not sure how best to resolve it. Any input would be appreciated.
Here's the details. If you include all the IIDs, Interfaces, etc for Excel you'll find this in the PBExcel.inc file...
' Version Independant ProgID's
$PROGID_Application = "Excel.Application"
If you include Word you'll have this...
' Version Independant ProgID's
$PROGID_Application = "Word.Application"
So the string equate names clash. But that isn't the bad part, because for one thing there aren't that many ProgIDs involved. I can just use this instead...
' Version Independant ProgID's
$PROGID_ExcelApplication = "Excel.Application"
and...
' Version Independant ProgID's
$PROGID_WordApplication = "Word.Application"
But Microsoft used the same names for very, very many Interfaces in these two apps, and I'm getting hundreds of Duplicate Name Errors for the IIDs associated with all these interfaces. So for each error I'm thinking I'll have to make alterations both at the point of the IID definition and at the point of the corresponding Interface definition. The process is..
1) Compile & Error Out;
2) Go to cursor at line that errors out, e.g,
$IID_Adjustments = GUID$("{000C0310-0000-0000-C000-000000000046}")
and prepend 'Excel' tp front of 'Adjustments'
$IID_ExcelAdjustments = GUID$("{000C0310-0000-0000-C000-000000000046}")
3) Search through file for any incidences of IID and change there. Its
fairly brutal.
Could an identifier from the app name be made a part of the IID equates so as to prevent this? Any ideas on how to fix it now? (easier than what I'm doing)
Here's the details. If you include all the IIDs, Interfaces, etc for Excel you'll find this in the PBExcel.inc file...
' Version Independant ProgID's
$PROGID_Application = "Excel.Application"
If you include Word you'll have this...
' Version Independant ProgID's
$PROGID_Application = "Word.Application"
So the string equate names clash. But that isn't the bad part, because for one thing there aren't that many ProgIDs involved. I can just use this instead...
' Version Independant ProgID's
$PROGID_ExcelApplication = "Excel.Application"
and...
' Version Independant ProgID's
$PROGID_WordApplication = "Word.Application"
But Microsoft used the same names for very, very many Interfaces in these two apps, and I'm getting hundreds of Duplicate Name Errors for the IIDs associated with all these interfaces. So for each error I'm thinking I'll have to make alterations both at the point of the IID definition and at the point of the corresponding Interface definition. The process is..
1) Compile & Error Out;
2) Go to cursor at line that errors out, e.g,
$IID_Adjustments = GUID$("{000C0310-0000-0000-C000-000000000046}")
and prepend 'Excel' tp front of 'Adjustments'
$IID_ExcelAdjustments = GUID$("{000C0310-0000-0000-C000-000000000046}")
3) Search through file for any incidences of IID and change there. Its
fairly brutal.
Could an identifier from the app name be made a part of the IID equates so as to prevent this? Any ideas on how to fix it now? (easier than what I'm doing)
Comment