從Microsoft Shared和SYSTEM32中提取出vba及其依賴的基本文件,,復制并設置注冊表 后,,即可讓WPS 2012使用VBA7,。但似乎WPS2012只認放在OFFICE10中的MSO.dll,。 所需的文件有: VBA目錄(只需VBA6,、VBA7中的VBE6EXT.OLB,,VBE7.DLL和2052), Office10目錄(只需MSO.DLL及1033或2052目錄下msointl.dll,,可取最新版本),, SYSTEM32下FM20.DLL,F(xiàn)M20CHS.DLL,,F(xiàn)M20ENU.DLL文件,, 提取之后運行批處理腳本SET.BAT自動復制和設置。 在WIN XP中雙擊SET.BAT,,在Win7中需在SET.BAT上點右鍵,,以管理員身份運行。 WPS 2012中:ALT + F8 運行宏,,ALT + F11 打開宏編輯器,。 http://ishare.iask.sina.com.cn/f/21438380.html SET.BAT中的批處理命令: MD "%CommonProgramFiles%\Microsoft Shared\office10" MD "%CommonProgramFiles%\Microsoft Shared\vba" XCOPY /I /S /-Y %~dp0\OFFICE10 "%CommonProgramFiles%\Microsoft Shared\office10" XCOPY /I /S /-Y %~dp0\VBA "%CommonProgramFiles%\Microsoft Shared\vba" XCOPY /I /S /-Y %~dp0\SYSTEM32 "%SystemRoot%\System32\" REG IMPORT %~dp0\VBA7.REG REGSVR32 /S "%CommonProgramFiles%\Microsoft Shared\VBA\VBA7\VBE7.DLL" REGSVR32 /S "%SystemRoot%\System32\fm20.dll" @echo "文件已復制。注冊表文件已導入,。DLL已登記,。" @pause VBE7.REG中的內(nèi)容: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VBA] "Vbe6DllPath"="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA7\\VBE7.DLL" "Vbe7DllPath"="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA7\\VBE7.DLL" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3] "PrimaryInteropAssemblyName"="Microsoft.Vbe.Interop, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" @="Microsoft Visual Basic for Applications Extensibility 5.3" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3\0] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3\0\win32] @="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3\FLAGS] @="0" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{0002E157-0000-0000-C000-000000000046}\5.3\HELPDIR] @="[{0002E157-0000-0000-C000-000000000046}]" [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1] [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1] @="Visual Basic For Applications" [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9] [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9\win32] [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\9\win32] @="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA7\\VBE7.DLL" [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\FLAGS] [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\FLAGS] @="0" [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\HELPDIR] [HKEY_CLASSES_ROOT\TypeLib\{000204EF-0000-0000-C000-000000000046}\4.1\HELPDIR] @="C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA7" |
|