Creare QR code dinamicamente Tramite
VBScript e googleapis.
Function fetchDocument(strDocURL,
filename)
'Create the XMLHTTP object to fetch the image
Set objXmlHTTP = CreateObject("Microsoft.XMLHTTP")
'Get the image
objXmlHTTP.Open "GET", strDocURL, False
objXmlHTTP.Send
'Create Stream object
Dim objStream
Set objStream = CreateObject("ADODB.Stream")
With objStream
'Specify stream type - we want To save binary data.
.Type = 1
'Open the stream And write binary
data To the object
.Open
.Write objXmlHTTP.ResponseBody
'Save binary data To disk
.SaveToFile "C:\test" & "\" & filename
'Clean up objects
.Close
End WIth
Set objXmlHTTP = Nothing
Set objStream = Nothing
End Function
qrcodelink="http://bstnetwork.blogspot.com/2014/12/stampare-pdf-tramite-vbscript.html"
fileName="123456"
Call fetchDocument("http://chart.googleapis.com/chart?chs=300x300&cht=qr&chl="&qrcodelink&"",
""&fileName&".png")
Verrà Creato il file in C:\test\
123456.png

Nessun commento:
Posta un commento