Getting an error Server creation failed. Invalid ProgID 'word.application'

42 ビュー (過去 30 日間)
Vilas Tade
Vilas Tade 2023 年 4 月 14 日
回答済み: Manoj Mirge 2023 年 4 月 19 日
by using the following code, i.m trying to convert the word file in to pdf on server. Sometime it works but sometime it throw an error.
Error : Server creation failed. Invalid ProgID 'word.application'
What could be the reason behind that.
Code:
word_app = actxserver('word.application');
word_Doc = word_app.Documents;
word_File = word_Doc.Open(file_path_docx);
word_File.SaveAs2(file_path_pdf,17);
word_Doc.Close;
word_app.Quit();

回答 (1 件)

Manoj Mirge
Manoj Mirge 2023 年 4 月 19 日
Hi Vilas,
There are several reasons why this issue can occur. If you are getting this error, it means MATLAB is not able to connect to Word due to some issue on your system. It is not a MATLAB error rather a Windows produced error.
Please see the below attached Matlab Answers thread for troubleshooting your issue:
I highly encourage you to try all workarounds mentioned in above Matlab Answers thread.
Hope this helps.

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by