Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
vTempFolder | = | C:\Geral\tmp\TEST.pdf |
I need to change the path to a variable
objEmail.AddAttachment "C:\Geral\tmp\Numero.pdf" Something like this
objEmail.AddAttachment = vTempFolderBeside the efforts of resolving your task within your qvw which is beyond the targets of the community it wouldn't be very helpful because there are multiple effects from a lot of environment-related topics included, like user- and security settings as well as how and where the tasks should be triggered and many more.
Especially noticeable is the targeted pdf-printer which is the old and outdated QlikView printer which either hints that you are dealing with a quite old release or - sounding more likely - it's just old code found and applied without really knowing what to do with it. In this case I suggest you are involving any Qlik/Partner support and/or implementing appropriate tools like NPrinting which providing a GUI to define the various print/export-jobs.
Seems you need just to use the (right) variable because the exists already:
...
TempFolder = GetVariable("vTempFolder")
...
objEmail.AddAttachment "C:\Geral\tmp\Numero.pdf" ' Attachement
objEmail.AddAttachment = TempFolder ?
What would this variable look like on the path?
🤔
In general, yes - means:
...
TempFolder = GetVariable("vTempFolder")
objEmail.AddAttachment = TempFolder
...
In some cases (especially if any spaces or special chars are included) it might be necessary to wrap the path with double-quotes which requires often a triple/quadruple repeating of the quotes (easier would be to include them already within vTempFolder). Using: msgbox TempFolder will show the real existing content of the variable and is in general a very simple method to validate variables or a loop-iterator and also until which point the macro runs expected or breaks.
Se filesys.FileExists("C:\Geral\tmp\Numero.pdf") então
filesys.DeleteFile "C:\Geral\tmp\Numero.pdf"
Fim se
Se filesys.FileExists("C:\Geral\tmp\QlikView Printing.pdf") então
filesys.MoveFile "C:\Geral\tmp\QlikView Printing.pdf", "C:\Geral\tmp\Numero.pdf"
Tem
pFolder = GetVariable("vTempFolder")
como faço para tratar essa parte do código. Pois tentei colocar a variável dentro e não funcionou. msgbox que você me deu trabalho.
I need to adapt the variable in these two places
Principally the hard-coded path could be simply replaced with the variable - but this variable needs of course to be available within the calling sub-routine. This means you need either to call the variable-routine within the sub or defining the variable globally or transferring the variable as sub-parameter.
What happens if the print is executed - nothing, any error or the execution breaks? Like above mentioned using one or several msgbox with the variable as output will quite soon show the cause behind the issue.
I need to repeat my question from above: "What happens if the print is executed - nothing, any error or the execution breaks?"
I'm sorry, Marco, fail.
I know your friend is very busy, I imagine, but with the attached qvw you can't just do a test with the variable that is also in the qvw.
Beside the efforts of resolving your task within your qvw which is beyond the targets of the community it wouldn't be very helpful because there are multiple effects from a lot of environment-related topics included, like user- and security settings as well as how and where the tasks should be triggered and many more.
Especially noticeable is the targeted pdf-printer which is the old and outdated QlikView printer which either hints that you are dealing with a quite old release or - sounding more likely - it's just old code found and applied without really knowing what to do with it. In this case I suggest you are involving any Qlik/Partner support and/or implementing appropriate tools like NPrinting which providing a GUI to define the various print/export-jobs.