I am using PDFtk Server but not for passwords, so I haven't done this exact thing. But your code looks correct. How about the data? If you have spaces in your paths this won't work. You need to quote the strings. It's easy to try this change:
ShellCmd = PDFtkPath & " """ & InputFilePath & """ output """ & OutputFilePath & """ user_pw " & Password
Bookmarks