#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
local oWnd, oBar
DEFINE WINDOW oWnd
DEFINE BUTTONBAR oBar OF oWnd 2007
DEFINE BUTTON OF oBar ACTION XBrowse( 'CUSTOMER.DBF' )
ACTIVATE WINDOW oWnd ON INIT XBrowse( "customer.dbf" )
return nil
TimStone wrote:This is a great addition. However, it would be nice to have a way to add buttons without constantly modifying the source code. For example, I have a button to send any document as an email. It converts the preview to a PDF and then attaches it to an email.
driessen wrote:I use bcc582 already for some time.
I'm using Office 2010 Professional.
The test with your small program went well.
Thanks.
I recompiled my application. At the preview box, I noticed 2 new buttons : a save-button (to save as word or pdf) and a word-button to export the report to word.
Unfortunately I got a problem. If I click on one of those 2 new buttons, my application is quited without any error-message.
driessen wrote:Antonio,
Any idea what the problem might be ?
Thanks.
The functionality you are now asking for was already provided long back in 2009 May and its there for almost 20 months.
We can use the function RPrevUserBtns( bNewUserBtns ) --> bPrevButtons.
May I ask; Is there a way also to remove buttons? I mean; may I remove the word and pdf buttons?
Function PDFSAVE(aFiles)
Local cString
Local cDestino
Local x:=0
Local cTexto:=""
cDestino := cGetFile("Export Report (*.pdf) | *.pdf |","Save as...", NIL, nil, .T., .T. )
If Len(aFiles) = 1
cString:="nConvert -o " + cDestino + " -quiet -out pdf -c 5 " + aFiles[1]
Else
If File("listaemf.txt")
Delete File listaemf.txt
Endif
For x=1 To Len(aFiles)
cTexto:=cTexto + aFiles[x] + CRLF
Next
MemoWrit("listaemf.txt",cTexto )
cString:="nConvert -multi -o " + cDestino + " -quiet -out pdf -c 5 -l listaemf.txt"
Endif
MsgRun("Wait","Exporting to PDF", {|| WAITRUN(cString,0 ) } )
MsgAlert("File "+ AllTrim(cDestino) +".PDF has been created.", " Export PDF ")
Return Nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 65 guests