Currently we developed a VB macro for word. While we tried to use it on mac it failed with message "VB Macro not supported in mac". Is there a way to c# office add-in for mac? My requirement is to have a simple utility to add comments(read from user) to the selected text in the current word document. Also need the functionality of the OpenFileDialog.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Mac Office does not (i.e. no longer) support COM/VBA automation. This means that you won't be able to use code from your existing Windows add-in.
In order to automate Mac Office you would have to make use of Automator Actions. I am not very familiar with these, but I believe that they are less feature-rich than the VBA object model of the Windows edition.
The following page has some Actions to get you started:
Microsoft Office Automator Actions
Update: It seems that the new Mac Office 2011 comes again with some support for VBA automation.