1
我正在嘗試使用Powershell,並讓它將版權字符輸出到MS Word文檔中。例如,下面列出的代碼就是我正在嘗試使用的代碼,它不起作用。Powershell中的特殊字符
$SummaryPara.Range.Text = "© "
$SummaryPara.Range.Text = "Get-Date -Format yyyy"
$SummaryPara.Range.Text = " - Name of Org Here "
$SummaryPara.Range.InsertParagraphAfter()
我是否需要以某種方式使用ALT + 0169序列?我不知道,因爲下面的代碼似乎工作是什麼,我做錯了:
$selection.TypeParagraph()
$selection.TypeText("© ")
$selection.TypeText((Get-Date -Format yyyy))
$selection.TypeText(" - Name of Org Here ")
$selection.TypeParagraph()
任何幫助,非常感謝爲使這項工作同時爲版權的字符和其他類似的特殊字符。
感謝您的信息和提示。他們一直很有幫助! – John