How to publish code as a Word document on a Mac?
14 次查看(过去 30 天)
显示 更早的评论
I have Mac Office 2011 and R2012b, yet I haven't been able to publish .m code as a word document.
publish('my_fun.m','doc')
results in the following error:
"Error using mxdom2word (line 9) Publishing to Microsoft Word is only supported on the PC."
Really? This basic operation isn't supported? Is there a work-around?
0 个评论
采纳的回答
Walter Roberson
2012-11-29
Likely the communications with MS Word is handled via ActiveX, which is not present in OS-X.
1 个评论
Ken Atwell
2012-11-29
Walter is right, publishing to Microsoft Word is performed with Active-X, a technology specific to Windows.
As an alternative, would publishing to HTML or PDF (supported on Macs) be workable for you?
更多回答(2 个)
Matthew Simoneau
2012-11-29
A workaround is to publish to HTML, open the HTML up in Word, and then save as Word.
3 个评论
Terrance Nearey
2013-2-9
This has other drawbacks. For example, Line breaks appear not to be preserved. Seems like a bug in Word 2011.
John Ondov
2016-2-18
Great idea! May not be perfect,but better than trying to convert pdf to word - at least as far as I know!
ZHONGQIAN SHANGGUAN
2020-6-15
When I used the code to publish my file, i just got the following error info:
Publishing to Microsoft Word is only supported on the PC.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ActiveX 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!