Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimize created email from Access

Status
Not open for further replies.

LeanneGodney

Technical User
Mar 7, 2002
175
GB
Hi there,
Sorry but I haven't checked the database for the answer to this cos for some reason it won't let me search!

I am creating an email from Access using the createitem(olmailitem) etc, and at the end of all my arguments and set it to display.

Thing is, I want it to display, but to be minimized so it doesn't take over the control screen in Access. I've got word minimizing by simply saying objWord.windowstate = olminimized, and that works, but it won't let me minimize my email. I can minimize Outlook, but not the email...

Anyone know how to do this? Any help would be greatly appreciated!

Thanks,
Leanne
 
Answered my own questions:

For i = 1 To Outlook.Inspectors.Count
Outlook.Inspectors.Item(i).WindowState = olMinimized
Next i
 
Hi,

I can't get this to work, did you define anything at the start of the code

Thanks in advance Rob! [Bigcheeks]
Process and Procedure are the last hiding place of people without the wit
and wisdom to do their job properly.
 
Hi Rob,

I'm doing this in Access, and I've selected to use the Outlook reference in Tools -> References -> Outlook 9.0 Object Library...

I'm using Office 2000... what version are you on? Maybe that makes a difference...

Do you have any emails open? Does it give you any error messages?

Leanne
 
Hi, its probably the reference mine is outlook 98. I keep geeting object not difined and the i highlighted.
Rob! [Bigcheeks]
Process and Procedure are the last hiding place of people without the wit
and wisdom to do their job properly.
 
Okay, then try defining an object...

ie:

Dim objOutlook as New Outlook.Application

For i = 1 To MyOutlook.Inspectors.Count
objOutlook.Inspectors.Item(i).WindowState = olMinimized
Next i

If this doesn't work... which word does it highlight when the error comes up? is it the objOutlook word or the Inspectors word?
 
Ooopps....

Change MyOutlook to objOutlook!!! Sorry!

For i = 1 To MyOutlook.Inspectors.Count
objOutlook.Inspectors.Item(i).WindowState = olMinimized
Next i

Hope it works,
Leanne
 
Hello again,

Dim objOutlook As New Outlook.Application
For i = 1 To MyOutlook.Inspectors.Count
objOutlook.Inspectors.Item(i).WindowState = olMinimized
Next i

It still highlighted the i, so I added Dim i as Integer, then it went to Myoutlook, I changed this to Outlook. the Inspectors then highlighted. I've been though the dropdown list and this isn't included. I recon its the different versions, I'll try on a computer with outlook 2K.

Thanks anyway
Rob! [Bigcheeks]
Process and Procedure are the last hiding place of people without the wit
and wisdom to do their job properly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top