Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros across different office versions
Hi,
I have an excel speadsheet that conatains a macro which performs some automation tasks. The Macro was originally written with Office XP on a Windows XP System. The idea is something like the following: 1. Original template file opened (Read only) by party X who enters some info into a form 2. When the command button in Excel is clicked a copy of the workbook is saved and attached to an email which is sent to Party Y 3. Party Y who is using Office 2003 opens the sheet attached to the email, makes some further changes to the form, then clicks the button again. This saves a new copy and attaches the new copy to an email which is passed back to Party X. The problem is that the orignal workbook has "References" to various Microsoft Office 10 Object Libraries (Excel and Outlook). When this copy is opened using Office 2003 these references are updated to point to Microsoft Office 11 Object Libraries and the Macro runs fine but when this is saved and passed back to Party X as in stage 3 mentioned above the object Libraries (specifically the Outlook Object Libraries) don't revert back to Microsoft Office 10 Libraries as hoped. So in short how can I get a macro saved in Office 2003 to work in Office XP? Any help on this would be appreciated. Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros across different office versions
Excel seems to be able to fix its own references along with that to the
Office library: XL2000: Create WB with some code. References seen to XL 9.0 Save & Close XL2002: Open above saved WB References seen to XL 10.0 Save As & Close XL2000: Open above saved WB References seen to XL 9.0 So it would be the other reference(s), Outlook etc, that are not being "down-dated". As it seems like your code is working and tested, you can drop the references (and lose the benefit of Intellisense, but that is no longer a concern) and switch to Late Binding, from your current Early Binding. Whilst there is a slight performance hit and you cannot use Events with the late bound objects, this would be the easiest way. http://peltiertech.com/Excel/EarlyLateBinding.html NickHK "PMC1" wrote in message ups.com... Hi, I have an excel speadsheet that conatains a macro which performs some automation tasks. The Macro was originally written with Office XP on a Windows XP System. The idea is something like the following: 1. Original template file opened (Read only) by party X who enters some info into a form 2. When the command button in Excel is clicked a copy of the workbook is saved and attached to an email which is sent to Party Y 3. Party Y who is using Office 2003 opens the sheet attached to the email, makes some further changes to the form, then clicks the button again. This saves a new copy and attaches the new copy to an email which is passed back to Party X. The problem is that the orignal workbook has "References" to various Microsoft Office 10 Object Libraries (Excel and Outlook). When this copy is opened using Office 2003 these references are updated to point to Microsoft Office 11 Object Libraries and the Macro runs fine but when this is saved and passed back to Party X as in stage 3 mentioned above the object Libraries (specifically the Outlook Object Libraries) don't revert back to Microsoft Office 10 Libraries as hoped. So in short how can I get a macro saved in Office 2003 to work in Office XP? Any help on this would be appreciated. Paul |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Macros across different office versions
On May 15, 10:52 am, "NickHK" wrote:
Excel seems to be able to fix its own references along with that to the Office library: XL2000: Create WB with some code. References seen to XL 9.0 Save & Close XL2002: Open above saved WB References seen to XL 10.0 Save As & Close XL2000: Open above saved WB References seen to XL 9.0 So it would be the other reference(s), Outlook etc, that are not being "down-dated". As it seems like your code is working and tested, you can drop the references (and lose the benefit of Intellisense, but that is no longer a concern) and switch to Late Binding, from your current Early Binding. Whilst there is a slight performance hit and you cannot use Events with the late bound objects, this would be the easiest way.http://peltiertech.com/Excel/EarlyLateBinding.html NickHK "PMC1" wrote in message ups.com... Hi, I have an excel speadsheet that conatains a macro which performs some automation tasks. The Macro was originally written with Office XP on a Windows XP System. The idea is something like the following: 1. Original template file opened (Read only) by party X who enters some info into a form 2. When the command button in Excel is clicked a copy of the workbook is saved and attached to an email which is sent to Party Y 3. Party Y who is using Office 2003 opens the sheet attached to the email, makes some further changes to the form, then clicks the button again. This saves a new copy and attaches the new copy to an email which is passed back to Party X. The problem is that the orignal workbook has "References" to various Microsoft Office 10 Object Libraries (Excel and Outlook). When this copy is opened using Office 2003 these references are updated to point to Microsoft Office 11 Object Libraries and the Macro runs fine but when this is saved and passed back to Party X as in stage 3 mentioned above the object Libraries (specifically the Outlook Object Libraries) don't revert back to Microsoft Office 10 Libraries as hoped. So in short how can I get a macro saved in Office 2003 to work in Office XP? Any help on this would be appreciated. Paul- Hide quoted text - - Show quoted text - Thanks Nick. That was very helpful. Problem solved! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is solver different between Office versions? | Excel Worksheet Functions | |||
Office 07 opening older versions in compatibility mode-min/maximiz | Excel Discussion (Misc queries) | |||
Coping with multiple versions of Office | Excel Programming | |||
Office Excel 2003 Versions and VBA | Setting up and Configuration of Excel | |||
multiple versions of Office references | Excel Programming |