Publishing to doc format fails with odd error
이전 댓글 표시
I can successfully use the publish function if I set the output format to something like pdf or html, but if set the output format to doc I get an error that says Undefined function 'SaveAs' for input arguments of type 'Interface.0002096B_0000_0000_C000_000000000046'. I've observed this error on several different computers, all running MATLAB 2023a.
댓글 수: 4
Pooja Kumari
2023년 9월 7일
Can you define the input arguments you were using and of what type the input arguments are?
Kevin Galloway
2023년 9월 7일
Pooja Kumari
2023년 9월 7일
You can refer to the below documentation for more information on publish command on MATLAB R2023a:
Kevin Galloway
2023년 9월 7일
답변 (1개)
Pooja Kumari
2023년 9월 8일
Dear Kevin,
I understand that you are encountering an "Undefined function 'SaveAs' for input arguments of type 'Interface.0002096B_0000_0000_C000_000000000046'" error when using the publish function in MATLAB with the output format set to "doc".
The publish command attempts to start up Word as a COM server to perform the operation. To verify if MATLAB is unable to start Word as a COM server, you can run the following command in the MATLAB prompt:
h = actxserver('Word.Application')
If there is an issue, an error message will be displayed.
Additionally, make sure you are running MATLAB as an administrator. Running MATLAB with administrative privileges can sometimes resolve issues related to starting Word as a COM server.
Another option you can try is starting Word as a COM server outside of MATLAB. You can use a VBA script to accomplish this. Running Word as a COM server separately will help determine if the issue lies with MATLAB or with Word itself.
A similar workaround will be given in the below MATLAB answer : (mathworks.com)https://in.mathworks.com/matlabcentral/answers/1608520-error-from-word-when-using-publish
You can refer to the below documentation for more information on publish command on MATLAB R2023a:
I hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Use COM Objects in MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!