title: Print array in text body of CDO email
body: <p>I have successfully loaded an array <code>myArray(30,1)</code> with data and would like to print the data in the text body of the CDO email.This is the section of code that works fine (it has been is service for months) before I attempt to print the array in the text body.  You can see I was simply passing the variables <code>Fullname</code> and <code>Amt</code>:</p>
  
  <pre><code> Set iMsg = CreateObject("CDO.Message")
                  With iMsg
                      Set .Configuration = iConf
  
  
                      .To = "MC123@gmail.com"
                      .From = """ME Report Error"" &lt;MC124@gmail.com&gt;"
                      .Subject = "Current Period Monthly Report variance"
                      .TextBody = "Hello," &amp; vbNewLine &amp; vbNewLine &amp; _
                                  "Please review the variances to NAV in the following report:" &amp; vbNewLine &amp; vbNewLine &amp; _
                                  "Report Location:  " &amp; FullName &amp; vbNewLine &amp; vbNewLine &amp; _
                                  "Variance amount:  " &amp; Amt &amp; vbNewLine
                      .Send
                  End With
                  Set iMsg = Nothing
  </code></pre>
  
  <p>Now when I attempt loop through my array in the text body I get an error:</p>
  
  <pre><code> Set iMsg = CreateObject("CDO.Message")
                  With iMsg
                      Set .Configuration = iConf
  
  
                      .To = "MC123@gmail.com"
                      .From = """ME Report Error"" &lt;MC124@gmail.com&gt;"
                      .Subject = "Current Period Monthly Report variance"
                      .TextBody = "Hello," &amp; vbNewLine &amp; vbNewLine &amp; _
            ERROR  ------------ &gt;  &amp; For x = LBound(myArray, 1) To UBound(myArray, 1)
                                    For y = LBound(myArray, 2) To UBound(myArray, 2)
                                      ThisWorkbook.Sheets("Sheet1").Cells(x + 1, y + 1) = myArray(x, y)
                                  Next y
                              Next x
                      .Send
                  End With
                  Set iMsg = Nothing
  </code></pre>
  
  <p>I know the syntax inside of the loops is incorrect.  I used that to drop the array into a spreadsheet (which worked fine).  But I was hoping a slight modification would allow me to put it into the email text body, however it is simply not liking me placing code there it seems.  The error I am receiving is </p>
  
  <pre><code>"Compile Error: Expected: Expression"
  </code></pre>
  
  <p>The error falls on the <code>&amp;</code> on the first line below the <code>.TextBody</code> line.  I am not conviced this goal is even possible.  I may have to print the array in a spreadsheet and email it as an attachment, but would much prefer to have it print in the text body.  </p>
  
  <p>Much appreciated!</p>