WPS 基础接口 > 演示 API 参考 > DocumentWindow > 方法 > DocumentWindow.NewWindow 方法
打开一个包含指定窗口中所显示文档的新窗口。返回一个代表新窗口的 DocumentWindow 对象。

语法

表达式.NewWindow

表达式   一个代表 DocumentWindow 对象的变量。

返回值
DocumentWindow

示例

本示例创建一个与当前窗口有相同内容的新窗口(同时激活新窗口)并返回到原窗口。

示例代码
let oldW = Application.ActiveWindow
let newW = oldW.NewWindow()
oldW.Activate()


请参阅