To convert imported data to custom fields in Task list

Status
Not open for further replies.

excelbeginner

New Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Hi I have no VBA background, and I will like to know how do I convert import data to custom fields in task list.

I understand i have to first map to the default fields then copy the default fields values to my own user created fields. Will anyone able to assist?

The closest solution i came across so far is the code below but it is for contact management, anyone able to help modify the code below to make it applicable for tasklist?

Sub ConvertFields()
Dim objApp As Application
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Dim objItems As Items
Dim objItem As Object

Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.PickFolder
If Not objFolder Is Nothing Then
Set objItems = objFolder.Items
For Each objItem In objItems
' make sure you have a Contact item
If objItem.Class = olContact Then
' convert to your published custom form
objItem.MessageClass = "IPM.Contact.Custom"
' copy data to your custom fields
objItem.UserProperties("Custom1") = objItem.User1
objItem.UserProperties("Custom2") = objItem.User2
objItem.UserProperties("Custom3") = objItem.User3
objItem.UserProperties("Custom4") = objItem.User4
objItem.User1 = ""
objItem.User2 = ""
objItem.User3 = ""
objItem.User4 = ""
objItem.Save
End If
Next
End If

Set objItems = Nothing
Set objItem = Nothing
Set objFolder = Nothing
Set objNS = Nothing
Set objApp = Nothing
End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Do you have more than 4 custom fields? If you do, you need to import all of the fields - its not hard, just more writing code.

to change that code, it looks like you only need to change these lines:

If objItem.Class = oltasks Then
' convert to your published custom form
objItem.MessageClass = "IPM.tasks.Custom" <== change custom to the correct custom task form name.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
M Convert Subject Line to Internet Header version of Subject Outlook VBA and Custom Forms 10
P How do I convert outlook “to-do” items to “tasks” Outlook VBA and Custom Forms 1
I Convert POP3 account (PST) to IMAP (.OST) Using Outlook 3
S problem with convert Using Outlook 1
I Outlook 2016 64bit - on receipt convert emails into PDF and save Outlook VBA and Custom Forms 2
C convert an .ost to .pst Using Outlook 3
D The way to convert ost to pst Using Outlook 2
J Outlook 2013 how to convert 2013 OST file into an another format, i m using outlook 2013 versions. Using Outlook 1
sneaky30 convert text to date Outlook VBA and Custom Forms 1
P Is it possible to convert address book to "Auto-Complete List" (NK2)? Using Outlook 5
Diane Poremsky Convert an Offline File (.ost) to a Personal File (.pst) New Slipstick.com Articles 0
S How to do I convert OST file to PST? Exchange Server Administration 3
J convert .pst to .eml, how is it possible? Using Outlook 1
M convert/import a customized record into the default "Account" record BCM (Business Contact Manager) 0
V Check/convert to emailaddresses Outlook VBA and Custom Forms 11
R Convert Access table to pst Using Outlook 1
M Outlook 2013 won't convert Excel contacts into Outlook contacts using my custom form Using Outlook 3
L Convert Distribution List of Contacts to Single Contacts Using Outlook 6
G Is there any way to convert outlook 2003 to outlook 2007 Using Outlook 5
D Outlook contacts no in address book - 2002 pst file convert to 2007 pst file? Using Outlook 0
P Outlook 2002 - How to upgrade to 2003 and convert PST from ANSI to Unicode? Using Outlook 7
K Outlook Contact Group - can you convert to a .vcf? Using Outlook 1
P How can I convert an Outlook 2010 folder to a .pdf with active links like I could in Outlook 2007? Using Outlook 3
J Is it possible to convert a shared calender in Outlook to a ical version that can be subscribed to by confluence. Using Outlook 1
O convert OE Address book folders/subgroups to Outlook 2010? Using Outlook 4
O convert Outlook Express to Outlook 2010 Using Outlook 1
C convert windows live mail to outlook 2010 Using Outlook 4
A Outlook 2003: convert all RTF emails to HTML Outlook VBA and Custom Forms 1
J How to convert BCM contacts to normal Outlook contacts BUT... BCM (Business Contact Manager) 2
A Convert client Outlook 2007 .ost to Outlook 2007 .pst Using Outlook 8
G Tasks - convert email to task & attach email Outlook VBA and Custom Forms 6
A Re: Convert Oportunity to Project? BCM (Business Contact Manager) 3
B convert VBA code to Add-in Outlook VBA and Custom Forms 1
Q How tough is it to convert VBA to Addin Outlook VBA and Custom Forms 1
P Outlook 2013 All imported Mail Rules in error when imported into new profile Using Outlook 5
J Moving Imported folder Using Outlook 2
B All imported tasks appear in to-do list Using Outlook 3
E Imported Contact Issues Using Outlook 11
R I have imported a .pst file into my outlook and I cannot locate it. It seems to be in my main Inbox Using Outlook 1
W URGENT Cancel and remove imported pop3 mails Using Outlook 6
A Contacts missing in imported mails Using Outlook 1
cimbian Filtering exclusive imported contacts Using Outlook 3
D Imported Tasks - Pop Up does not work Using Outlook 3
U Imported contacts to appear in Autocomplete Using Outlook 1
T BCM 2007 to Outlook 2010 with no BCM - need contacts imported BCM (Business Contact Manager) 3
J Missing folders/emails in imported Archive PST Using Outlook 10
T Outlook 2010 / SBS 2010 - User cannot view emails moved to a folder that was previously imported fro Using Outlook 6
S How to Archive by Send/Receive Date, NOT Modified Date for exported/imported msgs? Using Outlook 2

Similar threads

Top