Problem assigning string variable

Hello guys, I have a HTML file that I would like to use as template to send it through Send Email SMTP. When I read the html file using Read Text File I get the value

@"<html>
  <head>
    <link href=""https://fonts.googleapis.com/css?family=Nunito+Sans:400,400i,700,900&display=swap"" rel=""stylesheet"">
  </head>
    <style>
      body {
        text-align: center;
        padding: 40px 0;
        background: #EBF0F5;
      }
        h1 {
          color: #88B04B;
          font-family: ""Nunito Sans"", ""Helvetica Neue"", sans-serif;
          font-weight: 900;
          font-size: 40px;
          margin-bottom: 10px;
        }
        p {
          color: #404F5E;
          font-family: ""Nunito Sans"", ""Helvetica Neue"", sans-serif;
          font-size:20px;
          margin: 0;
        }
      i {
        color: #9ABC66;
        font-size: 100px;
        line-height: 200px;
        margin-left:-15px;
      }
      .card {
        background: white;
        padding: 60px;
        border-radius: 4px;
        box-shadow: 0 2px 3px #C8D0D8;
        display: inline-block;
        margin: 0 auto;
      }
    </style>
    <body>
      <div class=""card"">
      <div style=""border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;"">
        <i class=""checkmark"">✓</i>
      </div>
        <h1>MensajeExito</h1> 
        <p>El proceso se realizó de forma exitosa;<br/> gracias!</p>
      </div>
    </body>
</html>"

But I would like to not read the HTML file as text (Not use the Read Text File activity), but to assign a a string variable to the value of the text of the HTML, I mean:

exitoHTML = the exact string from above that I get from the Read Text File activity

but i get an “Expression expected” error and I do not understand if it is basically the same string that I get when I read the HTML file using the Read Text File activity, any help would be great, thanks in advance!

I also have tried to not use the @ when assigning the variable at the begining of the html string (with the double quotes outside the double quotes) and the error that I get instead is “String constants must end with a double quote”

in VB:
we concat the lines:
grafik

As an alternate we can use an invoke code, set it to C# and using the @. In some scenarios UiPath Version & specific UiPath.System.Activities it can be blocked and fail and requires some allignments on the used package version

so basically I would need to have each line of the html with double quotes and the &? Wow that seems exhausting, I think that it would be better if I just read the HTML as text file :thinking:

Hi @ahzaradsh ,

Replace all double quotes to single quotes inside the html.

Regards,
Arivu

Hi @ahzaradsh

You need to basically remove all enters in the text ypu are pasting. For readability you can have enters before pasting to string just remove them and the issue should be sorted

Cheers