04-16-2022 03:15 PM
Hi everyone,
I'm trying to compose and open new mail window in Outlook that is ready for sending using python script, but I run into dead end with error 1050 when executing.
The py code is shown on pic below and everything is working when I run it in Spyder
But when I try to run same code in LV I get error message:
I searched for solution online and find some examples like "pip install pywin32":
That didn't help... I was trying to use different python dlls and that didn't help either. I don't have ideas what to do next. Can someone please help me with this problem?
04-16-2022 10:26 PM
Hi,
I recommand a better solution for your project :
you could save the python code to a py file, and use the system Exec.vi (windows command line ) to run the python file.
you find attached the LabVIEW Code + python file ,and a video that preuve the Result.
Best Regards.
thank you.
04-17-2022 06:58 AM - edited 04-17-2022 07:02 AM
Hi, thank you for help.
I did try that first but I have another problem with that solution. I do not know how to code in python very well (you could say I'm total beginner). The e-mail im trying to send looks like this:
I have a table with some data in it and I do not know how to input table data to py script so I had "genious" idea to write whole script (python code, html and data for table, a whole code) as string (because I can easily change strings) and run that whole script like I showed in first post. And I got stucked
P.S. Can you please save VI for version 18.0. I can not open it. Ty
04-18-2022 12:27 AM
Hi,
you find attached the 2018 version ?
why you don`t use the SMTP mail ?
04-18-2022 01:56 AM
Hi,
this is a solution for your problem using SMTP Email .
you need to make sur that email account allow less security apps.
using set attachment.vi you could attach any file that you want to send.
you find below a video + software.
best Regards.
thank you.
kudos 🤗