How do you find the range of page n in Microsoft Word using office automation? There appears to be no getPageRange(n) function and it is unclear how they are divided.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Extract matrix elements using a vector of column i
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
You can use the Matlab OfficeDoc utility for reading/writing Word contents from Matlab: http://www.mathworks.com/matlabcentral/fileexchange/15192-officedoc-readwriteformat-ms-office-docs-xlsdocppt
Apologies if I don't have the right context for your question, but from looking at the Office Development docs it seems as though you have to create Range objects that contain what you want. The "Range Object" section of this page says: "The Range object represents a contiguous area in a document, and is defined by a starting character position and an ending character position. You are not limited to a single Range object. You can define multiple Range objects in the same document... [A Range] is not saved with a document and exists only while the code is running."
This is how you do it from VBA, should be fairly trivial to convert to Matlab COM calls.