小编tak*_*ana的帖子

基本Powershell - 批量转换Word Docx为PDF

我正在尝试使用PowerShell将Word Docx批量转换为PDF - 使用此站点上的脚本:http: //blogs.technet.com/b/heyscriptingguy/archive/2013/03/24/weekend-scripter -convert字的文档到PDF的文件与- powershell.aspx

# Acquire a list of DOCX files in a folder
$Files=GET-CHILDITEM "C:\docx2pdf\*.DOCX"
$Word=NEW-OBJECT –COMOBJECT WORD.APPLICATION

Foreach ($File in $Files) {
    # open a Word document, filename from the directory
    $Doc=$Word.Documents.Open($File.fullname)

    # Swap out DOCX with PDF in the Filename
    $Name=($Doc.Fullname).replace("docx","pdf")

    # Save this File as a PDF in Word 2010/2013
    $Doc.saveas([ref] $Name, [ref] 17)  
    $Doc.close()
}
Run Code Online (Sandbox Code Playgroud)

我继续得到这个错误,无法弄清楚原因:

PS C:\docx2pdf> .\docx2pdf.ps1
Exception calling "SaveAs" with "16" argument(s): "Command failed"
At C:\docx2pdf\docx2pdf.ps1:13 char:13 …
Run Code Online (Sandbox Code Playgroud)

powershell powershell-2.0 powershell-3.0

26
推荐指数
2
解决办法
4万
查看次数

AuthComponent:allowedActions和allow()之间的区别?

使用AuthComponent :: allowedActions和AuthComponent :: allow有什么区别?当我谷歌时,我看到大多数示例和文档使用或讨论allow(),但只有少数使用allowedActions.但它们在使用上看起来相似.

authentication acl cakephp

7
推荐指数
1
解决办法
2962
查看次数

acos表中使用的型号,lft和rght字段是什么?

在acos表中,model,lft和rght字段的cakePHP用法/含义是什么?同样,aros表中的lft和rght字段的用法/含义是什么?

authentication acl cakephp

7
推荐指数
1
解决办法
2877
查看次数