vbWayne
asked on
Outlook Folder
Increaded to 25 for working answer
I use this function I found on the net to open my mail (Outlook98) in the InBox.
However, it opens half screen..anyone know how to adjust it to have it open the folder maximized?'open folder in outlook
Public Function OpenFolder(FldrName As String)
Dim olApp As New Outlook.Application
Dim nsMAPI As Outlook.NameSpace
Set nsMAPI = olApp.GetNamespace("MAPI")
Dim d As Long
For d = 1 To nsMAPI.Folders.Count
Dim p
For p = 1 To nsMAPI.Folders.Item(d).Fol ders.Count
If nsMAPI.Folders.Item(d).Fol ders.Item( p).Name = FldrName Then
nsMAPI.Folders.Item(d).Fol ders.Item( p).Display
Exit Function
End If
Next p
Next d
End Function
'thanks,
'Wayne
I use this function I found on the net to open my mail (Outlook98) in the InBox.
However, it opens half screen..anyone know how to adjust it to have it open the folder maximized?'open folder in outlook
Public Function OpenFolder(FldrName As String)
Dim olApp As New Outlook.Application
Dim nsMAPI As Outlook.NameSpace
Set nsMAPI = olApp.GetNamespace("MAPI")
Dim d As Long
For d = 1 To nsMAPI.Folders.Count
Dim p
For p = 1 To nsMAPI.Folders.Item(d).Fol
If nsMAPI.Folders.Item(d).Fol
nsMAPI.Folders.Item(d).Fol
Exit Function
End If
Next p
Next d
End Function
'thanks,
'Wayne
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
My inexperience is showing up big time.
Thanks,
Wayne
Thanks,
Wayne
ASKER
My inexperience is showing up big time.
Thanks,
Wayne
Thanks,
Wayne
ASKER
My inexperience is showing up big time.
Thanks,
Wayne
Thanks,
Wayne
ASKER
Even more...
Your code doesn't work..olApp.ActiveWindow.W indowState = olMaximized
it says olMaximized variable not declared
If i try vbMaximized or 3 it says it doesn't support this property..
Help
Your code doesn't work..olApp.ActiveWindow.W
it says olMaximized variable not declared
If i try vbMaximized or 3 it says it doesn't support this property..
Help
vbWayne,
Sorry for the delay in responding, doing the weekend thing. The code works fine for me, I will try it on my test machine and see what it does! Be back shortly...
Sorry for the delay in responding, doing the weekend thing. The code works fine for me, I will try it on my test machine and see what it does! Be back shortly...
ASKER
No problem...thanks for staying connected..
Actually when I do the ActiveWindow.
and the box opens with all the possibilities...there is no window state.
Later
Not urgent...it's the weekend...enjoy
Actually when I do the ActiveWindow.
and the box opens with all the possibilities...there is no window state.
Later
Not urgent...it's the weekend...enjoy
I apoligize, I tested this without thinking my workstation is running Outlook 2000. As soon as I tried this on my test machine, running Outlook 98 it bombed out. Shouldn't be a problem to fix though. Actually WindowState doesn't appear in Outlook 2000 either, kind of funny actually.
Thanks!
Thanks!
ASKER
OK.
out of curiosity, where are you located...it's 6:08pm here and your posting says 2:02pm. Ontario, Canada here or is it just the clocks on this site out of whack.
out of curiosity, where are you located...it's 6:08pm here and your posting says 2:02pm. Ontario, Canada here or is it just the clocks on this site out of whack.
The locks are kind of whack 'o on the site. I am located on the Iowa/Illnois border in the US. I am on the Iowa side, but Illinois is 10 minutes away!
Well not so good news here. After not being able to get this to work, I called a friend who's sole purpose in lief is Office development. He informed me that until Outlook 2000, WindowState and the ability to control Minimize, Maximize and Restore of an Outlook window programatically was not supported. He pointed me to this article which covers the new properties, methods, etc. covered in Outlook 2000.
http://msdn.microsoft.com/library/techart/o2kwhatsnew.htm
If you look under properties you will find WindowState as a new property.
I would be more than glad to contact the folks at EE to get your points back to you.
:>)
http://msdn.microsoft.com/library/techart/o2kwhatsnew.htm
If you look under properties you will find WindowState as a new property.
I would be more than glad to contact the folks at EE to get your points back to you.
:>)
ASKER
Don't worry about the points, you earned them...my question has been answered (just can't be done)...
......thanks for the above and beyond the call of duty reply.
Wayne
......thanks for the above and beyond the call of duty reply.
Wayne
ASKER