|
|
楼主 |
发表于 2021-11-30 19:33:54
|
显示全部楼层
回复 13# idwma
RPC 服务器不可用。 (异常来自 HRESULT:0x800706BA)
所在位置 行:4 字符: 1
+ $b=$a.Documents.Open($_.fullname)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: ( [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
RPC 服务器不可用。 (异常来自 HRESULT:0x800706BA)
所在位置 行:5 字符: 1
+ $c=$b.range().text.trim().substring(0,5)+$_.extension #5是前5个字
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
RPC 服务器不可用。 (异常来自 HRESULT:0x800706BA)
所在位置 行:6 字符: 1
+ $b.close()
+ ~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
ren : 当文件已存在时,无法创建该文件。
所在位置 行:7 字符: 1
+ ren $_.fullname $c
+ ~~~~~~~~~~~~~~~~~~
这是啥问题 批量怎么就不行 |
|