hello everyone,
i created an application using VB.NET,
and i want it to automatically display user's full name without requesting the user to type it in a textbox or whatsoever.
my idea is to get it from Office Outlook 2003,
since most of the time, users will have Outlook running.
i tried using Microsoft Outlook 11.0 Object Library and modifying from this code below, but can't seem to be able to extract the "FullName" string.
can anyone shed some light on this?
a sample code would be very appreciated
i created an application using VB.NET,
and i want it to automatically display user's full name without requesting the user to type it in a textbox or whatsoever.
my idea is to get it from Office Outlook 2003,
since most of the time, users will have Outlook running.
i tried using Microsoft Outlook 11.0 Object Library and modifying from this code below, but can't seem to be able to extract the "FullName" string.
can anyone shed some light on this?
a sample code would be very appreciated
VB.NET:
'create application
Dim oOutlook As New ApplicationClass()
'connect to current namespace
Dim oNamespace As [Namespace] = oOutlook.GetNamespace("MAPI")
oNamespace.Logon()
'create a new email object
Dim mi As MailItem = oOutlook.CreateItem(OlItemType.olMailItem)
mi.To = "bob@yahoo.com"
mi.Body = "body text here"
mi.Subject = "mail title here"
'pop up email dialog
mi.Display()