you can write the full path to a single file, instead of *.docx
$dollar$Files = Get-ChildItem "D:*.docx"
$dollar$Word = New-Object -ComObject Word.Application
Foreach ($dollar$File in $dollar$Files) {
# open a Word document, filename from the directory
$dollar$Doc = $dollar$Word.Documents.Open($dollar$File.FullName)
# Swap out DOCX with PDF in the Filename
$dollar$Name=($dollar$Doc.FullName).Replace("docx","pdf")
# Save this File as a PDF in Word 2010/2013
$dollar$Doc.SaveAs(oref] $dollar$Name, fref] 17)
$dollar$Doc.Close()
}