[RESOLVED] Outlook (and non consistant ms programming)
Hello.
Hi.
Right, I have an object set to outlook (works) and can create mail from it (great!) but I cannot get the application to become visible.
Before you go n say it is one of the following - it isn't as there isn't a property/ method for it...
Display (works for the email but not the app)
Visible
Show
Since I haven't used Outlook VBA coding much (if ever) I would like to know if there is a resource explaining anything to do with Outlook vb coding that people have come across, or if there is some simplistic code to do this.
Thanks in advance.
Re: Outlook (and non consistant ms programming)
okay let's try
Logon instead..
Re: Outlook (and non consistant ms programming)
Re: Outlook (and non consistant ms programming)
VB Code:
Dim obOut As Object
Set obOut = CreateObject("Outlook.Application")
obOut.Session.Logon
Outlook is not the easiest of things to use mind..
Re: Outlook (and non consistant ms programming)
Wow. what a neat idea (NOT)
Stoopid MS
Right that logged on, the app appeared then vanished.
So might be closer, but no cigar yet.
Thanks for the help... I'll kick my football after I write microsoft on it. More fun!
Re: Outlook (and non consistant ms programming)
Looking at it I think that the MAPIFolder.Display might work better.. Try this one instead..
VB Code:
Dim obOT As Outlook.Application
Dim obNS As Outlook.Namespace
Dim obFD As Outlook.MAPIFolder
Set obOT = CreateObject("Outlook.Application")
Set obNS = obOT.GetNamespace("MAPI")
Set obFD = obNS.GetDefaultFolder(olFolderInbox)
obFD.Display
Set obFD = Nothing
Set obNS = Nothing
Set obOT = Nothing
Re: Outlook (and non consistant ms programming)
I was going to say nothing, but it is there now.
Can you take me through the steps?
Like what is namespace and MAPI (I can tell what the inbox one is) :)
Re: [RESOLVED] Outlook (and non consistant ms programming)
The NameSpace Object
Quote:
Originally Posted by From VBA Help
Represents an abstract root object for any data source. The object itself provides methods for logging in and out, accessing storage objects directly by ID, accessing certain special default folders directly, and accessing data sources owned by other users.
The MAPIFolder Object
Quote:
Originally Posted by From VBA Help
Represents a Microsoft Outlook folder. A MAPIFolder object can contain other MAPIFolder objects, as well as Outlook items. You can navigate nested folders by using a combination of Folders (index), which returns a folder within a name space or another folder, and the Parent property, which returns the containing object.
Note Search folders are not MAPIFolder objects and therefore, the methods and properties of a MAPIFolder object will not work on search folders
These are the folders that can be referred are..
olFolderCalendar, olFolderContacts, olFolderDeletedItems, olFolderDrafts, olFolderInbox, olFolderJournal, olFolderNotes, olFolderOutbox, olFolderSentMail, olFolderTasks, olPublicFoldersAllPublicFolders, and olFolderJunk.