473,395 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Help ! Outlook Automation with outlook visible

hi there
i have been tasked with automating a simple create email task using microsoft outlook.
the code below works create unfortunately it works only at a system level i.e. the user does not see it.
please help me make it visible
Expand|Select|Wrap|Line Numbers
  1. text="hello wolrd \nhello world this is hopefully a new paragrpah"
  2. subject="this is the E-mail"
  3. recipient="thingy-ma-bob@hotmail.com"
  4. o = win32com.client.DispatchEx("Outlook.Application.11")
  5. #o.Show() #<--here
  6. Msg = o.CreateItem(0)
  7. Msg.To = recipient
  8. Msg.Subject = subject
  9. Msg.Body = text
  10. Msg.Save()
  11. Msg.close
  12. o.Quit()
  13.  
I have tried
o.Visible throws a com error (AttributeError: Outlook.Application.Visible)
o.Display throws a com error (AttributeError: Outlook.Application.Display)
both the above set to true gain throws a com error
o.Show (AttributeError: Outlook.Application.Show)
all of the above with and without attributes
If i set o.Visible =1 (i.e. True)I get the com error
AttributeError: Property 'Outlook.Application.Visible' can not be set.

it must be possible as all other office products you can set to be visible.
obviusly I can
Expand|Select|Wrap|Line Numbers
  1. os.system("start outlook")
or run outlook.exe
but that is just nasty....
I might as well be using a Key pressing program and not bother with com
Please help
cheers
D2
Jun 17 '08 #1
1 5134
jlm699
314 100+
o.Visible throws a com error (AttributeError: Outlook.Application.Visible)
o.Display throws a com error (AttributeError: Outlook.Application.Display)
o.Show (AttributeError: Outlook.Application.Show)
These are telling you that the object doesn't have those attributes
If i set o.Visible =1 (i.e. True)I get the com error
AttributeError: Property 'Outlook.Application.Visible' can not be set.
This is telling you that this is a read-only variable, meaning there must be some method to set it to True. Perhaps there is a method that you could use like:
o.SetVisible( True )

Try scanning the API for Outlook COM objects
Jun 17 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: MLH | last post by:
Is the following remotely correct? =DDE("C:\Program Files\Program Files\Outlook Express\OEmig50","Attachment","Name") I'm not sure that OEmig50.exe is the executable for OE. Anybody know? ...
2
by: lauren quantrell | last post by:
Ok, so maybe this is way off the wall...and I realize this is more of a MS Windows question than an Access question, but here goes... Is there a way to grant an Access application itself admin...
4
by: gs | last post by:
I have searched Google, MSDN,... for a week. I am still unable to make available functions in my csharp dll as native windows functions for some legacy non dotnet application I just want to...
26
by: Tom Becker | last post by:
Is there a way, from Access, to programmatically click the Send and Receive button in Outlook?
0
by: salad | last post by:
I'm on A97 and have Outlook 2003 on the computer. There's some generic code at Tony Toew's site and at MS and on the web that's very similar....but I can't make it work. I want to use late...
1
by: =?Utf-8?B?cm9i?= | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
1
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
5
by: smdupont | last post by:
Hi everyone! I am brand new to the Access world. I have downloaded files for a data base that I will use with my new job to my computer. The data base tables and information is working great. ...
0
by: madihamir | last post by:
Iam new to .net and have gotten assignment for make the class library to automate the outlook I have tried to done it but i've to make the Handlers also . Detecting an methods for receiving and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.