AskMrStone Posted April 13, 2007 Share Posted April 13, 2007 Hi, folks. New guy on the block here. Have been using AutoIT for a very short time, and I'm needing to open Outlook, search for and open a message with a specific subject, save an attachment (CSV file) to the Desktop, then close/minimize Outlook and manipulate the file with Excel. Instead of using Run, WinActivate, etc., I was hoping to use COM instead, as it seemed more programmatic and less error-prone. However, I'm running into trouble right out of the chute. My first two statements are:CODE;Open Outlook:$outlook = ObjCreate("Outlook.Application")$outlook.VisibleWhen I save and run this, though, I get the following error message in my output:CODE>Running:(3.2.2.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\StoneS2\Desktop\FormatMECSV.au3" C:\Documents and Settings\StoneS2\Desktop\FormatMECSV.au3 (22) : ==> Variable must be of type "Object".: $outlook.Visible $outlook^ ERRORI tried using the #include <IE.au3> at the beginning of the script, because I saw it in someone's example code somewhere. Didn't have any effect. (Couldn't imagine why it would have, but I'll try most things once.)Any ideas, folks, about what I'm doing wrong? I've hit the forums here, MSDN, the AutoIT help files, and several other sources and can't figure out what I'm doing wrong. Incidentally, I'm using Outlook 2003 on Windows XP with all the latest SPs and patches.Thanks in advance for any and all help...Shawn Stone Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2007 Developers Share Posted April 13, 2007 no need to double post and the other one is in the right place ...... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts