<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: &amp;quot;Object doesn't support this property or method&amp;quot; when run sending email module in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077165#M932335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus! I have a try but it doesn't work, error says "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Object doesn't support this property or method: 'GetSheetObject'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, with my previous code, even though I got error message, but when I run the code I can get the excel with content that I want to send, but just can't send email successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand, how can an error message existing but I can still get the excel file with content I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Mar 2016 16:28:22 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-03-03T16:28:22Z</dc:date>
    <item>
      <title>"Object doesn't support this property or method" when run sending email module</title>
      <link>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077163#M932333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I simply copied the module code from another qlikview file, which runs perfect all the time on that file. However, using the same computer, the code can't run on my current file, and there is an error "&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Object doesn't support this property or method: 'obj.GetRowCount'".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can the same code can't run on another file? So confused.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub send_alerts()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set objExcel=nothing&lt;/P&gt;&lt;P&gt;set strDate=nothing&lt;/P&gt;&lt;P&gt;set filepath=nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set objMsg = CreateObject("CDO.Message")&lt;/P&gt;&lt;P&gt;Set msgConf = CreateObject("CDO.Configuration")&lt;/P&gt;&lt;P&gt;Set xlFile = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set wksht = ActiveDocument.Activesheet&lt;/P&gt;&lt;P&gt;ActiveDocument.Reload&lt;/P&gt;&lt;P&gt;With msgConf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ** OUT GOING SMTP SERVER **&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserver" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserver&lt;/A&gt;&lt;SPAN&gt;") = "xx.xx.xxx.xxx"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ** SMTP PORT **&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpserverport" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpserverport&lt;/A&gt;&lt;SPAN&gt;") = 25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ** CDO PORT **&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/sendusing" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/sendusing&lt;/A&gt;&lt;SPAN&gt;") = 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ** TIMEOUT **&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout" rel="nofollow" target="_blank"&gt;http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout&lt;/A&gt;&lt;SPAN&gt;") = 60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Fields.Update &lt;/P&gt;&lt;P&gt;End With&lt;/P&gt;&lt;P&gt;str=""&lt;/P&gt;&lt;P&gt;cnt1 = 0&lt;/P&gt;&lt;P&gt;Set objMsg.Configuration = msgConf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WITH xlFile&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .DefaultSaveFormat = xlWorkbookNormal&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .DisplayAlerts = FALSE&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Workbooks.Open "S:\aa\bb\cc\abc.xlsx" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .DisplayFullScreen = TRUE&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Visible = TRUE&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; END WITH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set wksht1 = xlFile.Worksheets(1)&lt;/P&gt;&lt;P&gt;wksht1.Range("A1:AA1000").ClearContents&lt;/P&gt;&lt;P&gt;'ActiveDocument.GetApplication.Sleep 10000&lt;/P&gt;&lt;P&gt;col = 0&lt;/P&gt;&lt;P&gt;flag = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to wksht.NoOfSheetObjects-1&amp;nbsp; &lt;/P&gt;&lt;P&gt;set obj = wksht.SheetObjects(i)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;cnt = obj.GetRowCount&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;--error happens here&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(cnt&amp;gt;1) Then&lt;/P&gt;&lt;P&gt;flag = flag + 1&lt;/P&gt;&lt;P&gt;str1 = mid(obj.GetObjectId,10)&lt;/P&gt;&lt;P&gt;'msgbox(str1)&lt;/P&gt;&lt;P&gt;if(cnt1 = 0) Then&lt;/P&gt;&lt;P&gt;str = str &amp;amp; str1&lt;/P&gt;&lt;P&gt;cnt1 = cnt1 + 1&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;str = str &amp;amp; ", "&amp;amp; str1&lt;/P&gt;&lt;P&gt;cnt1 = cnt1 + 1&lt;/P&gt;&lt;P&gt;End if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;str = str &amp;amp; vbNewLine &amp;amp; myRange &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set ObjectFrom = ActiveDocument.GetSheetObject(obj.GetObjectId) &lt;/P&gt;&lt;P&gt;j = ObjectFrom.GetRowCount&lt;/P&gt;&lt;P&gt;k = ObjectFrom.GetColumnCount&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;m = 0&lt;/P&gt;&lt;P&gt;wksht1.Cells(col+1,1).Value = str1&lt;/P&gt;&lt;P&gt;wksht1.Cells(col+1,1).Font.Bold = True&lt;/P&gt;&lt;P&gt;For x = (1 + col + 1) to (j + col + 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp; For y = 1 to k&lt;/P&gt;&lt;P&gt;&amp;nbsp; wksht1.Cells(x,y).Value = ObjectFrom.GetCell(m,y-1).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; Next&lt;/P&gt;&lt;P&gt;&amp;nbsp; m = m + 1&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;col = col + j + 2&lt;/P&gt;&lt;P&gt;'ActiveDocument.GetApplication.Sleep 1000&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;End if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wksht1.SaveAs "&lt;SPAN style="font-size: 13.3333px;"&gt;S:\aa\bb\cc\abc.xlsx&lt;/SPAN&gt;" &lt;/P&gt;&lt;P&gt;'ActiveDocument.GetApplication.Sleep 10000&lt;/P&gt;&lt;P&gt;xlFile.Quit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(flag &amp;gt; 0) Then&lt;/P&gt;&lt;P&gt;ActiveDocument.GetApplication.Sleep 2000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;objMsg.To = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:xx@xx.edu" target="_blank"&gt;xx@xx.edu&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;objMsg.From = "&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:xxx@xxx.edu" target="_blank"&gt;xxx@xxx.edu&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;objMsg.Subject = "Collateral report"&lt;/P&gt;&lt;P&gt;objMsg.HTMLBody = str &amp;amp; " table(s) are not null"&lt;/P&gt;&lt;P&gt;objMsg.AddAttachment "&lt;SPAN style="font-size: 13.3333px;"&gt;S:\aa\bb\cc\abc.xlsx&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;objMsg.Send&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Else&lt;/P&gt;&lt;P&gt;End if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set objMsg = Nothing&lt;/P&gt;&lt;P&gt;set msgConf = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077163#M932333</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: "Object doesn't support this property or method" when run sending email module</title>
      <link>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077164#M932334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need GetSheetObject instead of SheetObjects like in this example (from APIGuide.qvw):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set table = ActiveDocument.GetSheetObject( "CH01" )&lt;/P&gt;&lt;P&gt;CellRect = ActiveDocument.GetApplication().GetEmptyRect()&lt;/P&gt;&lt;P&gt;CellRect.Top = 0&lt;/P&gt;&lt;P&gt;CellRect.Left = 0&lt;/P&gt;&lt;P&gt;CellRect.Width = table.GetColumnCount&lt;/P&gt;&lt;P&gt;CellRect.Height = table.GetRowCount&lt;/P&gt;&lt;P&gt;set CellMatrix = table.GetCells( CellRect )&lt;/P&gt;&lt;P&gt;for RowIter=CellRect.Top to CellRect.Height-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ColIter=CellRect.Left to CellRect.Width-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox(CellMatrix(RowIter)(ColIter).Text)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 09:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077164#M932334</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-03-03T09:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: "Object doesn't support this property or method" when run sending email module</title>
      <link>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077165#M932335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus! I have a try but it doesn't work, error says "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Object doesn't support this property or method: 'GetSheetObject'"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, with my previous code, even though I got error message, but when I run the code I can get the excel with content that I want to send, but just can't send email successful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand, how can an error message existing but I can still get the excel file with content I want?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 16:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077165#M932335</guid>
      <dc:creator />
      <dc:date>2016-03-03T16:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: "Object doesn't support this property or method" when run sending email module</title>
      <link>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077166#M932336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally I solve this strange issue by replacing reload data code in my previous could-send-email file, and create all table and chart again...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 20:56:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/quot-Object-doesn-t-support-this-property-or-method-quot-when/m-p/1077166#M932336</guid>
      <dc:creator />
      <dc:date>2016-03-03T20:56:15Z</dc:date>
    </item>
  </channel>
</rss>

