cooper Posted January 20, 2017 Posted January 20, 2017 Hi I would like a script that will print a html file. Would also like to email it if possible and have it triggered from a .exe I'm sure its possible but have not found a solution that works for me yet. Thanks
Knil92 Posted April 28, 2017 Posted April 28, 2017 When you say print, do you mean send it to a printer? or save it as a html file and then e-mail that html file as an attachment in an e-mail?
Knil92 Posted April 28, 2017 Posted April 28, 2017 You can use a powershell script to save a html page. Command as follows; wget http://blog.stackexchange.com/ -OutFile C:\out.html open up notepad copy and paste that into it and replace the stack exchange url with the one you want to save, and the output location and file name, file>save as, and save it as htmlsave.ps1, then you can create a vbscript to send an e-mail and have the html file as an attachment. VBScript To Send Email Using CDO heres a tutorial on how to do that. Then you can create a batch file to run both the ps1 and then the vbs file, something like; @echo off start C:\Filepath\HTMLSAVE.PS1 start C:\Filepath\e-mail.vbs del C:\filepath\HTMLPAGE.html exit
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now