08-13-2014 09:29 AM - edited 08-13-2014 09:30 AM
Hi community,
in certain cases I need to shut down and restart outlook. In order to do so I a batch file what I want to get rid of and do everything from LabVIEW. When I run the following snippet I receive an error popup complaining that the path is not valid. Which is true because on some computers outlook is in the program files folder, in some computer it is in the program files(x86) folder, but that should not be a problem because of the "IF EXIST". It works fine from the batch file.
Please help me out here.
Thanks!
ps: I know this is not the right way. I would like to use activeX but I have not found any way to actually start outlook. (I need to have it open, not just sending a mail with activeX)
Solved! Go to Solution.
08-13-2014 09:41 AM
08-13-2014 09:43 AM
Yes... I can do that very easily. But I would rather keep this function in the code itself.
08-13-2014 09:51 AM - edited 08-13-2014 09:52 AM
08-13-2014 10:08 AM
No its not. That requires a file to get saved to the hdd.
08-13-2014 11:08 AM
My outlook.exe is in C:\Program Files (x86)\Microsoft Office\Office14. I got the error you mentioned when I ran your snippet (corrected for office 12/14), but got no error when I removed the third element from your array. It seems that %programfiles% is clever enough to get the program from (x86). I do have a C:\Program Files\Microsoft Office\Office14 folder, but there's no outlook.exe in it.
I found this on Stack Overflow
08-14-2014 03:37 AM
<facepalm>
thanks Jim! Work like a charm.