在开发word2007插件的时候这样引入类库就会出现问题:
#import "C:\Program Files\Common Files\DESIGNER\MSADDNDR.DLL" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search#import "C:\Program Files\Common Files\microsoft shared\OFFICE12\mso.dll" rename_namespace("Office"), rename("DocumentProperties", "MSO_DocumentProperties"), rename("RGB", "MSO_RGB"), named_guids, exclude("Pages")#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.olb" rename_namespace("VBE6")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" \
rename_namespace("Word"), raw_interfaces_only, named_guids ,exclude("Pages"), rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")
如果加入红色字体那一行代码就完全OK:
#import "C:\Program Files\Common Files\DESIGNER\MSADDNDR.DLL" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search#import "C:\Program Files\Common Files\microsoft shared\OFFICE12\mso.dll" rename_namespace("Office"), rename("DocumentProperties", "MSO_DocumentProperties"), rename("RGB", "MSO_RGB"), named_guids, exclude("Pages")#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.olb" rename_namespace("VBE6")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" \
rename_namespace("Word"), raw_interfaces_only, named_guids ,exclude("Pages"), rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")请问各位这是怎么回事呢?红色哪行代码有什么用呢?看上去,觉得有了最后一行代码就不需要红色那一行了。
重复的 COMDAT“_IID_Adjustments” 这样的错误如何解?
#import "C:\Program Files\Common Files\DESIGNER\MSADDNDR.DLL" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search#import "C:\Program Files\Common Files\microsoft shared\OFFICE12\mso.dll" rename_namespace("Office"), rename("DocumentProperties", "MSO_DocumentProperties"), rename("RGB", "MSO_RGB"), named_guids, exclude("Pages")#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.olb" rename_namespace("VBE6")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" \
rename_namespace("Word"), raw_interfaces_only, named_guids ,exclude("Pages"), rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")
如果加入红色字体那一行代码就完全OK:
#import "C:\Program Files\Common Files\DESIGNER\MSADDNDR.DLL" raw_interfaces_only, raw_native_types, no_namespace, named_guids, auto_search#import "C:\Program Files\Common Files\microsoft shared\OFFICE12\mso.dll" rename_namespace("Office"), rename("DocumentProperties", "MSO_DocumentProperties"), rename("RGB", "MSO_RGB"), named_guids, exclude("Pages")#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.olb" rename_namespace("VBE6")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")#import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" \
rename_namespace("Word"), raw_interfaces_only, named_guids ,exclude("Pages"), rename("ExitWindows","ExitWindowsEx"),rename("FindText", "MSO_FindText")请问各位这是怎么回事呢?红色哪行代码有什么用呢?看上去,觉得有了最后一行代码就不需要红色那一行了。
重复的 COMDAT“_IID_Adjustments” 这样的错误如何解?
重复的 COMDAT“_IID_Adjustments”
当我调用spDoc->Name的时候会错误说Name不是Word::_Document的成员。
而使用上面的代码则可以的。 #import "C:\\Program Files\\Microsoft Office\\OFFICE12\\MSWORD.OLB" \
rename_namespace("Word"), raw_interfaces_only, rename("ExitWindows","ExitWindowsEx"), rename("FindText", "MSO_FindText")