Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


how do i put a custom label on a link when creating an outlook task?


how do i put a custom label on a link when creating an outlook task?

Author
Message
tikboydev
tikboydev
Forum God
Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)Forum God (375 reputation)

Group: Forum Members
Posts: 1, Visits: 4
hi... i'm relatively new to outlook task creation from visual basic. hope someone can help me... when i create an outlook task, i want to insert a link with a custom string... e.g. please see screenshot:







instead of the left screen, i would like to come up with the right screen. any help, tips or sample code would be highly appreciated... thank you very much in advance.



by the way, i'm using visual studio 2005, microsoft outlook 2003 and outlook interop from outlook 2003.



-------------------

Imports xOutlook = Microsoft.Office.Interop.Outlook



Public Class Form1



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim xOutlookApp As New xOutlook.Application

Dim xNameSpace As xOutlook.NameSpace = xOutlookApp.GetNamespace("MAPI")

CreateTaskItem(xOutlookApp)

End Sub



Private Sub CreateTaskItem(ByRef xOutlookApp As xOutlook.Application)

Dim xNewTask As xOutlook.TaskItem = CType(xOutlookApp.CreateItem(xOutlook.OlItemType.olTaskItem), Microsoft.Office.Interop.Outlook.TaskItem)



xNewTask.Subject = "My Task " & Now.ToString

xNewTask.PercentComplete = 50

xNewTask.StartDate = Date.Now

xNewTask.DueDate = Date.Now.AddDays(5)

xNewTask.Status = Microsoft.Office.Interop.Outlook.OlTaskStatus.olTaskInProgress

xNewTask.Complete = False



'''' setting the task body

xNewTask.Body = "Click here to view google." _

& Environment.NewLine & Environment.NewLine _

& "Test... http://www.google.com"



xNewTask.Save()

End Sub



End Class

---------------

tikboy x dev
Edited
7/29/2009 by tikboydev
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search