AnsweredAssumed Answered

Passing HTML to VBS file

Question asked by pthomas on Jun 24, 2012
Latest reply on Jun 25, 2012 by pthomas



I have been playing around with a VBS file as a method of getting around FileMakers limitation of not supporting HTML e-mails.


Due to security restrictions enforced by our IT department I am not able to generate the VBS file dynamically out of FileMaker, our system administrator will only allow me to execute an existing VBS file that is set to read only.


So I am looking at passing in various information (Subject, Body etc...) through script parameters and I have hit a bit of a snag.

FileMaker seems to be having trouble passing through the HTML tags correctly.


This is the command that I am using for my SendEvent step:


"C:Program FilesFileMakerVBSEmail.vbs" "Subject Test" "<i>Is this thing on?</i><p>Yes</p>"


And my VBS script then picks up two parameters:


SendTo = Wscript.Arguments.Item(0)

Subject = Wscript.Arguments.Item(1)


If I set up a new shortcut on my computer using the above string it executes fine, however when I try to run this from FileMaker I get the the following error:




If I remove the / character out of the </i> and </b> tags then the script runs fine (although the formatting of the HTML is of course wrong) so it would seem that FileMaker is doing something funny with the / character...


I tried escaping the / with a  but that didn't seem to work and as far as I know / should not need to be escaped anyway?


In case it matters here is the full FileMaker script I am using:




And the VBS script:




Has anyone come across this before or can anyone think of another way for me to be able to get this working?