Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bom pessoal,
Consigo enviar PDF via e-mail através de disparadores usando macro.
Mas crie bat para chamar aplicação pelo controle de tarefas do windows.
Mas estou enviando 02 email.
Preciso de uma dica.
acho que estou fazendo algo de errado.
o arquivo abaixo
Crie 03 Bat
//Carregar Bat: Bat1
start /MIN C:\Geral\Script\abrir.bat
//Abrir Qvw: Bat2
"C:\Program Files\QlikView\QV.EXE" /r "C:\Geral\EmailPDF\12.qvw"
@echo off
taskkill /F /IM Qv.exe
"C:\Geral\EmailPDF\12.qvw"
exit
//Fechar a aplicação: Bat3
@echo off
taskkill /F /IM Qv.exe
Alguma dica para automatizar este qvw em anexo
Perfeito Yuri
Muito Obrigado pela atenção e competência.
Como ficou:
ActiveDocument.Reload
ActiveDocument.PrintDocReport "RP01","Teste"
Set WSHShell = CreateObject("WScript.Shell")
fln = "S:\BI\TecnoFlex\PDF\myreport.pdf"
RegKey = "HKEY_CURRENT_USER\Software\QlikViewPDF\"
WSHShell.RegWrite RegKey & "BypassSaveAs", 1
WSHShell.RegWrite RegKey & "OutputFile", fln
ActiveDocument.GetApplication.Sleep 2000
WSHShell.RegWrite RegKey & "BypassSaveAs", 0
WSHShell.RegWrite RegKey & "OutputFile", ""
Set WSHShell = nothing
ActiveDocument.Save
ActiveDocument.GetApplication.Quit
end sub
*************************************************
Bat:
start /wait "C:\Program Files\QlikView" Qv.exe /NoSecurity "C:\Geral\EmailPDF\12.qvw"
@echo off
exit
Perfeito!!