DisclaimerThe sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind.
![]()
' To set the path to the current folder set shApp = CreateObject('shell.application') currentPath = CreateObject('Scripting.FileSystemObject').GetAbsolutePathName('.' ) set shFolder = shApp.NameSpace( currentPath ) ' To set the items in the current folder as 'files' set files = shFolder.Items 'Start of code' 'msgbox('Starting Script') for each files in files ' If name contains 'DN' ' if inStr(files, 'DN') then 'print out 1 time' end if ' if name contains 'INV' ' if inStr(files, 'INV. What I would like to accomplish is to do away with the print dialog box not have it appear at all, I want to specify in the code of the “Print Form” button to print directly to the “Adobe PDF” printer, which will then bring up the save dialog asking the user where to save the PDF form.
Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
![]() Print a PDF file from VBscript. Almost works...Print a PDF file from VBscript. Almost works...I'm a newby at VBscript, but I often have to use it from LiveCode (RunRev) to do things...After 2 (!) days of search for what I believe should be a very popular script, that is, run a VBscript that given a file path will print (to the default printer) the Pdf and get some kind of feedback, I came up with this two script. Script 1: print the file. Replace the <thedocpath> with the path to the pdf file. This script works fine except that I dont know how to print more then 1 copy of the file so I have to loop trough it, and this slows things. As I said I run it from Livecode, but it works also if you save it to a text.vbs file and double clik it. Script 2) Check the spooler. Replace <docname> with the name of your pdf file. This give me some kind of feedbak (return =1 print ok, =0 print NO ok) Since there may be more then one copies of the same print (because I had to loop), I cannot return 1 right after the printing start, but I have to wait until all the copies got spooled... CODE --> VbscriptI believe that my code is kind of messy so I would be gratefull if someone can streamline and clean it....! ![]() But my question is: How can I print more then one copy of the same file, without looping ? Thanks for any help or suggestion. Trevix ![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |