WinCC Comfort BV Script for Email

DLMUK

Member
Join Date
Jun 2013
Location
Southampton
Posts
311
Hi,

I am using this command which I have in a VB script and then linked to a button on my HMI screen.

Sub VBFunction_1()

SendEMail SmartTags("AddressTag"), "Confirmation", "This is a VBS Test", "[email protected]"

End Sub


what I would like to do is be able to create an email body which can have multiple values in, to include 3 strings, 2 integer, 2 date and 1 real.

does anybody know if you can do that in the VB script of does it only allow you to send a single string val?

thanks
 
You can contaticate variables to make one string using the "&". Note you should convert your variables using the CStr(variable).

Ex:

Dim EmailSubject
Dim EmailMessage
Dim EmailReturnAddress

EmailSubject = "Confirmation"
EmailMessage = Value1 is " & CStr(SmartTags("intvalue1")) & " and Value2 is " & CStr(SmartTags("realvalue1")) & "."
EmailReturnAddress = "[email protected]"


SendEMail SmartTags("AddressTag"), EmailSubject, EmailMessage, EmailReturnAddress
 
Hi

That's perfect - thanks!

do you know if it is possible to attach images stored on the HMI, or attach files from the USB stick to it?

What I would ideally like to do is attach a report to the email and send it, I can use the PrintToPDF drivers to save the report. Just not sure how to attach it.

thanks
 

Similar Topics

is there any free trial version available for step7 professional and wincc comfort v17. i searched and downloaded TRIAL Download STEP 7...
Replies
1
Views
69
Hello, just started my first project with a unified HMI. I want to use an image as background, how is this accomplished?
Replies
1
Views
588
Does anyone know if it is possible to only publish certain pages to the webserver? The only thing I can find to limit users somehow is to restrict...
Replies
0
Views
359
Hi - I want to make sure I'm on the right track regarding popup faceplate creation. There does not seem to be a way to pass parameters into a...
Replies
7
Views
3,612
Can anyone tell me what the difference is between these two SIMATIC WinCC programming software packages are?: :- SIMATIC WinCC Flexible 2008...
Replies
2
Views
2,454
Back
Top Bottom