08-08-2017 09:49 PM
When I use the example VI attached(copyed from message four in https://forums.ni.com/t5/LabVIEW/ActiveX-Read-Outlook-Calendar-and-Task-List/m-p/1186647)
this example doesnot work well on my PC,It strucked when meet a 'meeting' in the Inbox,and just list 6 mails in the VI's pannel.
After I add a 'error cleaning' block ,it can list more message,
but it is still a little strange. I can see there are 145 mails in Inbox at OutLook, see as below:
but this VI tells me there are 222mails in the Inbox,see as below:
Things worse are that , the mails list are not coressponding to the fact, the top several mails are missing,see below:
I am also puzzled with the Activex close block, from
https://forums.ni.com/t5/LabVIEW/Get-Outlook-Emails-by-Date-Received-using-ActiveX/m-p/3644303 ,
message 4,I see that ,the close block just beside the creat block. But ,from another blog
it(the use of 'close') may not be so simple.
And even ,some VIs do not close the ActiveX at all ,see in the attached example, as well as in below:
So , I modified the attached when I use it ,as below:
Is it necessary or correct ?
12-06-2017 01:16 PM
I have found that certain types of emails, for example ones that have calendar entries, will cause all subsequent emails in the inbox to show up a empty strings.
01-14-2019 06:16 AM
Yes, the reason you will have lost emails is because some emails such as calendar invites use a different activeX class, in the calendar invite case the ActiveX class used is: outlook apointment item. This will trigger an error because you use a different class (error 3008) and due to your shift register it will propagate to the other email reads in the loop, due to how LabVIEW is, functions are set up to do nothing if they receive an error and this will cause you a blank result even if the program can see that there are say 50 emails and loops 50 times. Simply just replace the error shift register in the for loop with a tunnel and this should go away. I had this problem too but I found this post:
01-14-2019 10:02 AM
@captainfungus wrote:
Yes, the reason you will have lost emails is because some emails such as calendar invites use a different activeX class, in the calendar invite case the ActiveX class used is: outlook apointment item. This will trigger an error because you use a different class (error 3008) and due to your shift register it will propagate to the other email reads in the loop, due to how LabVIEW is, functions are set up to do nothing if they receive an error and this will cause you a blank result even if the program can see that there are say 50 emails and loops 50 times. Simply just replace the error shift register in the for loop with a tunnel and this should go away. I had this problem too but I found this post:
This is BAD advice. You have the potential to swallow important errors. HANDLE ERRORS PROPERLY.
01-14-2019 10:43 AM - edited 01-14-2019 10:44 AM
well... I was just suggesting an easy fix to his code and explaining why it does not work at the moment, I am sure there are better ways of doing this
FYI the only potential errors you will get there are the use of the wrong ActiveX class - such as calendar invites which you want to ignore anyway, so it really does not matter.
01-14-2019 11:01 AM
@captainfungus wrote:
well... I was just suggesting an easy fix to his code and explaining why it does not work at the moment, I am sure there are better ways of doing this
FYI the only potential errors you will get there are the use of the wrong ActiveX class - such as calendar invites which you want to ignore anyway, so it really does not matter.
I see. Whenever offering "shortcut" advice to an inexperienced programmer, I always explain what the shortcut is, and why the shortcut is okay in the specific case. Now that you've explained why it's okay to ignore any errors encountered, I feel better about the advice. 🙂