mlreportgen.utils.word Class
Namespace: mlreportgen.utils
Interact with Microsoft Word and Word documents
Description
Use the static methods of the mlreportgen.utils.word
class to interact
interacting with the Microsoft® Word application and Word documents. These methods use the MATLAB® interface to the Microsoft .NET Framework to interact with Word.
The mlreportgen.utils.word
class is a handle
class.
Methods
|
|
|
Specify
|
mlreportgen.utils.word.open |
A
Specify |
mlreportgen.utils.word.close | These syntaxes close the Word application and return
These syntaxes close the Word document specified by
Specify |
mlreportgen.utils.word.closeAll | These syntaxes close all open Word documents, return
Specify |
mlreportgen.utils.word.show |
Specify
|
mlreportgen.utils.word.hide |
Specify
|
mlreportgen.utils.word.filenames | files = mlreportgen.utils.word.filenames() returns the open
Word document file names as a string array. |
mlreportgen.utils.word.isAvailable | tf = mlreportgen.utils.word.isAvailable() returns
true if Word is available for use and false
if Word is not available for use. |
mlreportgen.utils.word.isStarted | tf = mlreportgen.utils.word.isStarted() returns
true if the Word application is started and
false if the Word application is not started. |
mlreportgen.utils.word.isLoaded |
Specify |
mlreportgen.utils.word.wordapp |
|
mlreportgen.utils.word.worddoc |
Specify |
Examples
Suppose that the Word files, test.docx
and
test1.docx
are in a folder named mydocs
on the
C:
drive. Open the files using
mlreportgen.utils.word.open
.
wordDoc = mlreportgen.utils.word.open("test") wordDoc1 = mlreportgen.utils.word.open("test1")
wordDoc = WordDoc with properties: FileName: "C:\mydocs\test.docx" wordDoc1 = WordDoc with properties: FileName: "C:\mydocs\test1.docx"
Suppose that the Word files test.docx
and
test1.docx
are in a folder named mydocs
on the
C:
drive and that you opened them using
mlreportgen.utils.word.open
.
Obtain the file names of the open Word document files by using
mlreportgen.utils.word.filenames
.
files = mlreportgen.utils.word.filenames()
files = 1×2 string array "C:\mydocs\test.docx" "C:\mydocs\test1.docx"
Limitations
mlreportgen.utils.word
is only available on Microsoft Windows®.mlreportgen.utils.word
is not supported in a MATLAB web app.
Version History
Introduced in R2018b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)