Hi guys,
I have this parse error when I added the <Img src> line since I would like to add an image to my email. Can someone determine how to fix the error? This involves the VBS script. Also I would like to ask how can I add this in the autoexec.bat to execute in the Alteryx?
Hoping someone to assist me on this.
Kamen
hi @KamenRider A couple of possible causes are:
1) A part of strings are not properly enclosed by single/double quotes. In your blue colored highlight, it contains single quotes and double quotes as a string. You can refer to the below discussion.
2) You try to concatenate Numeric fields. If so, use ToString() function.
hi @KamenRider Like this. When you handle the string having single quotes ' and double quotes " being mixed up, you need to carefully escape them. For your ready reference, I attach WF.
BTW, if you wanna run .bat file in the stream of WF, try Run Command Tool. If you are new to this tool, please go to sample of this tool, and see how it works at first. This tool is a bit tricky one.
Hi @gawa
Can you please screenshot you response (formula tool) so I can what is the difference. I tried downloading a trial version of Alteryx and it is asking for the license. I have no way to open the workflow outside.
Thanks,
Kamen
hi @KamenRider Here you are.
'Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Dim OutTable
OutTable = CreateObject("Scripting.FileSystemObject").OpenTextFile("'+[htmpath]+'").ReadAll()
On Error Resume Next
OutMail.To = "DISTRO"
OutMail.CC = "' + [CC (Optional)] + '"
Outmail.BCC = "' + [BCC (Optional)] + '"
Outmail.SentOnBehalfOfName = "' + [From (optional)] + '"
Outmail.Subject = "' + [Subject] + '"
Outmail.Attachments.Add "' + [Attachment Location (Optional)] + '"
Outmail.HTMLBody ="<img src='+"'"+'\\xxx.com\xxx\xxx\600\OFFICE\xxx\xxx\Decks\PNG\xxx.png>"
Outmail.HTMLBody = OutTable
Outmail.Send
Set OutMail = Nothing
Set OutApp = Nothing'
Hi @gawa
Thank you so much for the response. I no longer received the error. However the image is still not appearing. It give me a "red X" symbol instead of the image. Would you know why? Is there something missing in the code?
I do hope you could still help me on this.
Thank,
Kamen