佚名通过本文主要向大家介绍了vc调用matlab函数,vc调用函数,vc怎么调用函数,vba调用excel函数,vba 调用函数等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 怎样在VC中调用Word的VBA函数?
描述:
解决方案1:
描述:
我的Word的VBA函数是这样定义的:
Function GetProp() as String
End Function
可是我在VC中一调用
m_spApp->Run("New.New.GetProp")
就Word就死掉。
请问这是什么问题?
解决方案1:
这个GetProp()函数是干什么的,我怎么查不到?word的类型库没有这个函数。
解决方案2:把返回值放在GetProp里面吧,不知道VB能否有指针或引用
解决方案3: you should Use Automation to Run this ,check this KB
HOWTO: Use Automation to Run a Word 97 Macro with Arguments
Q183369
Office Automation Using Visual C++
Q196776
INFO: Office Developer Samples and Tools Available for Download
Q253338
try Function GetProp()
End Function