Answer» Hy,
I like open pdf file with multi password. The password is computer name and user name. More person have this routine. This is possible?
Example: run program, if computer name and user name correct, open protected pdf file automatical. ... Dim username As String username = Space(40) GetUserName username, Len(username) Label21.Caption = username Label21.Caption = UCASE$(Label21.Caption) Dim computername As String computername = Space(40) GetComputerName computername, Len(computername) Label22.Caption = computername Rem users ************************ If Label21.Caption = "xxxxxxxx" And Label22.Caption = "yyyyyyyyy" Then GoTo user1 ... ... user1: Dim iResult As Double Dim iPath As String iPath = "C:\Program FIles\Adobe\Acrobat 7.0\Reader\AcroRd32.exe " iResult = Shell(iPath, vbMaximizedFocus) ... ...
ThxNone of that makes any sense.... there is no involvement of PASSWORDS, and all it does is start acrobat reader... correction, it start acrobat reader, if it's installed. and it has to be VERSION seven. and it has to be on a 32-bit version of windows. Not very good odds.
There are ways to open a PDF file with whatever PDF viewing program the user has selected, but I'm not sure what you are referring to REGARDING a password. Is it a password implemented by the VB6 program? or a password on the PDF?
the former is possible, but not particularly a good idea- a person could easily open the PDF without the password anyway. The latter also seems a tad silly- when you open the PDF file the user will be prompted for the password anyway.The problem is the next. Files are provided with password the pdf. It WOULD be the aim, that not the user types in the password when it opens the file. If enabled using key is the password-protected file, then an routine submits the password and ready.
|