1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
// Define this according to the Microsoft Office Object Model version you are compiling under
//#define OFFICE14 // MS Office 2010
//#define OFFICE12 // MS Office 2007
//#define OFFICE11 // MS Office 2003
//#define OFFICE10 // MS Office 2002
//#define OFFICE9 // MS Office 2000
//#define OFFICE8 // MS Office 1997
#if defined(OFFICE14) // Office 2010
#ifndef FRA
#ifndef Program_Files_x86
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE14\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "D:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE14\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#else
#ifndef Program_Files_x86
#import "C:\\Program Files\\Fichiers communs\\Microsoft Shared\\OFFICE14\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Fichiers communs\\Microsoft Shared\\OFFICE14\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#endif
#elif defined(OFFICE12) // Office 2007
#ifndef FRA
#ifndef Program_Files_x86
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE12\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "D:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE12\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#else
#ifndef Program_Files_x86
#import "C:\\Program Files\\Fichiers communs\\Microsoft Shared\\OFFICE12\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Fichiers communs\\Microsoft Shared\\OFFICE12\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#endif
#elif defined(OFFICE11) // Office 2003
#ifndef FRA
#ifndef Program_Files_x86
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#else
#ifndef Program_Files_x86
#import "C:\\Program Files\\Fichiers communs\\Microsoft Shared\\OFFICE11\\mso.dll" \
rename_namespace("Office") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Fichiers communs\\Microsoft Shared\\OFFICE11\\mso.dll" \
rename_namespace("Office") \
auto_rename
#endif
#endif
#elif defined(OFFICE10) // Office 2002
#ifndef FRA
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE10\\mso.dll" \
rename_namespace("Office"), rename("DocumentProperties", "DocProps")
#else
#import "C:\\Program Files\\Fichiers communs\\Microsoft Shared\\OFFICE10\\mso.dll" \
rename_namespace("Office"), rename("DocumentProperties", "DocProps")
#endif
#elif defined(OFFICE9) // Office 2000
#import "C:\\Program Files\\Microsoft Office\\Office\\mso9.dll" \
rename_namespace("Office"), rename("DocumentProperties", "DocProps")
#elif defined (OFFICE8) // Office 1997
#import "C:\\Program Files\\Microsoft Office\\Office\\mso97.dll" \
rename_namespace("Office"), rename("DocumentProperties", "DocProps")
#endif // OFFICE12
#if defined(VBA6) // VBA 6
#ifndef FRA
#ifndef Program_Files_x86
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" \
rename_namespace("VBA") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" \
rename_namespace("VBA") \
auto_rename
#endif
#else
#ifndef Program_Files_x8
#import "C:\\Program Files\\Fichiers communs\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" \
rename_namespace("VBA") \
auto_rename
#else
#import "C:\\Program Files (x86)\\Fichiers communs\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" \
rename_namespace("VBA") \
auto_rename
#endif
#endif
#endif // VBA6 |
Partager