I am trying to send email attachments from RBase 9.5 64 using mapi mail and am having problems sending out the email. My preferred method would be to send them out using out bit I can't seem to make Outlook work at all. I would appreciate some sample code to get at least one method working.
Thanks in advance for any and all help Larry -----Original Message----- From: "A. Razzak Memon" <[email protected]> Sent: 5/20/2014 11:19 AM To: "[email protected] (RBASE-L Mailing List)" <[email protected] (RBASE-L Mailing List)> Subject: [RBASE-L] - Re: Print PDF document At 01:29 PM 5/20/2014, [email protected] wrote: >Hello >R:BASE 9.5 (32) >What is the best way to print a PDF file? >I tried the command >LAUNCH CMD_PRINT | filename.PDF | W | HIDE >but after printing Acrobat Reader is not closed and the Rbase remains locked. >I have to manually close the PDF document and at this point the Rbase unlocks. Daniele, Here's how: Two techniques ... 01. Using the CHOOSE Command 02. Using the LoadFileName PLUGIN Once you understand the logic, feel free to adapt the code as you see fit. Example 01 (Using the CHOOSE Command): -- start CLEAR VAR vPDFFileName,vMsg,vPrintYesNo,vPrintString,vQuotes SET VAR vPDFFileName TEXT = NULL SET VAR vMsg TEXT = NULL SET VAR vPrintYesNo TEXT = NULL SET VAR vPrintString TEXT = NULL SET VAR vQuotes TEXT = (CVAL('QUOTES')) CLS CHOOSE vPDFFileName FROM #LFILES IN *.PDF + CHKBOX 1 TITLE 'Select PDF File to Print' + CAPTION ' R:Pick and Print PDF On Demand!' LINES 30 FORMATTED + OPTION LIST_FONT_COLOR WHITE + |LIST_BACK_COLOR TEAL + |TITLE_FONT_COLOR RED + |TITLE_BACK_COLOR WHITE + |WINDOW_BACK_COLOR WHITE + |TITLE_FONT_NAME VERDANA + |TITLE_FONT_SIZE 14 + |TITLE_BOLD ON + |WINDOW_CAPTION + |BUTTONS_BACK_COLOR WHITE + |BUTTONS_SHOW_GLYPH ON IF vPDFFileName IS NULL OR vPDFFileName = '[Esc]' THEN GOTO Done ENDIF SET VAR vMsg = + ((CHAR(013))+'File Name:'&.vPDFFileName+(CHAR(013))+(CHAR(013))+ + 'Would you like to Print?'+(CHAR(013))) CLS DIALOG .vMsg vPrintYesNo vEndKey YES + CAPTION ' R:Pick and Print PDF On Demand!' + ICON APP + OPTION TITLE_FONT_COLOR BLACK + |TITLE_BACK_COLOR WHITE + |TRANSPARENCY 255 + |WINDOW_BACK_COLOR WHITE + |BUTTON_YES_CAPTION &Print + |BUTTON_NO_CAPTION &Cancel + |BUTTON_YES_COLOR GREEN + |BUTTON_NO_COLOR RED + |BUTTON_YES_FONT_COLOR WHITE + |BUTTON_NO_FONT_COLOR WHITE IF vPrintYesNo = 'No' OR vEndKey = '[Esc]' THEN GOTO Done ENDIF SET VAR vPrintString = + (.vQuotes+'C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe|/p /h' + &.vPDFFilename+.vQuotes) -- Change the syntax based on your installed version of Adobe Acrobat Reader LAUNCH &vPrintString LABEL Done CLEAR VAR vPDFFileName,vMsg,vPrintYesNo,vPrintString,vQuotes RETURN -- end Example 02 (Using the LoadFileName PLUGIN) -- start CLEAR VAR vPDFFileName,vMsg,vPrintYesNo,vPrintString,vQuotes SET VAR vPDFFileName TEXT = NULL SET VAR vMsg TEXT = NULL SET VAR vPrintYesNo TEXT = NULL SET VAR vPrintString TEXT = NULL SET VAR vQuotes TEXT = (CVAL('QUOTES')) CLS PLUGINS LoadFileName vPDFFileName + |FULLPATH ON + |NO_CHANGE_DIR ON + |VIEW_MODE LIST + |TITLE R:Pick and Print PDF - Select PDF File + |FILTER Adobe PDF Files (*.pdf)#*.PDF IF vPDFFileName IS NULL OR vPDFFileName = '[Esc]' THEN GOTO Done ENDIF SET VAR vMsg = + ((CHAR(013))+'File Name:'&.vPDFFileName+(CHAR(013))+(CHAR(013))+ + 'Would you like to Print?'+(CHAR(013))) CLS DIALOG .vMsg vPrintYesNo vEndKey YES + CAPTION ' R:Pick and Print PDF On Demand!' + ICON APP + OPTION TITLE_FONT_COLOR BLACK + |TITLE_BACK_COLOR WHITE + |TRANSPARENCY 255 + |WINDOW_BACK_COLOR WHITE + |BUTTON_YES_CAPTION &Print + |BUTTON_NO_CAPTION &Cancel + |BUTTON_YES_COLOR GREEN + |BUTTON_NO_COLOR RED + |BUTTON_YES_FONT_COLOR WHITE + |BUTTON_NO_FONT_COLOR WHITE IF vPrintYesNo = 'No' OR vEndKey = '[Esc]' THEN GOTO Done ENDIF SET VAR vPrintString = + (.vQuotes+'C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe|/p /h' + &.vPDFFilename+.vQuotes) -- Change the syntax based on your installed version of Adobe Acrobat Reader LAUNCH &vPrintString LABEL Done CLEAR VAR vPDFFileName,vMsg,vPrintYesNo,vPrintString,vQuotes RETURN -- end Both techniques will print the PDF document directly to printer without launching the Adobe Acrobat Reader and then clicking on the print button. If you need more examples or the actual demo application, feel free to contact me. Enjoy and make sure to have fun! Razzak. www.rbase.com www.facebook.com/rbase -- 31 years of continuous innovation! 16 Years of R:BASE Technologies, Inc. making R:BASE what it is today! --

