I have read many threads and discussions on how to supress the PDF Writer prompt screen and allocate a filename directly to the PDF file from a VB6 program. I am therefore trying to set the Registry value 'PDFFileName' to the filename I want before attempting to print.
The line of code I have is:
retval = RegSetValueExSt ring(HKEY_CURRE NT_USER, "Software\ADOBE \Acrobat PDFWriter\PDFFi leName", 0, REG_SZ, MyFilename, mylen)
MyFilename is a string which has a filename with full path, and mylen is the length of this string in bytes as returned by LenB. The return value I get is 0 - ie. there is no error, and yet it doesn't actually do anything!
The information I have read about the function RegSetValueExSt ring says that it will create the value if it is not already there.
I have tried creating the PDFFileName value directly via regedit before running the code but it doesn't set it.
I have tried creating the PDFFileName value in regedit and allocating it a valid filename and path. Then the VB6 behaves as I want, as it bypasses the prompt window from PDF Writer and creates the file (and then removes the PDFFilename setting!)
I feel like I am going round in circles - any thoughts anyone??????
Thanks
The line of code I have is:
retval = RegSetValueExSt ring(HKEY_CURRE NT_USER, "Software\ADOBE \Acrobat PDFWriter\PDFFi leName", 0, REG_SZ, MyFilename, mylen)
MyFilename is a string which has a filename with full path, and mylen is the length of this string in bytes as returned by LenB. The return value I get is 0 - ie. there is no error, and yet it doesn't actually do anything!
The information I have read about the function RegSetValueExSt ring says that it will create the value if it is not already there.
I have tried creating the PDFFileName value directly via regedit before running the code but it doesn't set it.
I have tried creating the PDFFileName value in regedit and allocating it a valid filename and path. Then the VB6 behaves as I want, as it bypasses the prompt window from PDF Writer and creates the file (and then removes the PDFFilename setting!)
I feel like I am going round in circles - any thoughts anyone??????
Thanks
Comment