Ho to add records to a PST file?

M

MeAgin

Hi all,



When loading Oulook I want to connect to my web service and download some
data and show them in a different folder in Outlook. How can I achieve this?
Data I download are in XML format. Is it possible to add these data to the
PST file and show in the normal mail grid view?

What should be the best approach?



Thanks in advance.



Beset regards,

Nadeera
 
S

Sue Mosher [MVP-Outlook]

To create a new item in a non-default folder programmatically, use the Add method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
M

MeAgin

Thanks.
Using this way i can create an item (Set objItem =
objFolder.Items.Add("IPM.Note.MyNote") in the drafts but not in my folder.
I just added an item and then updated the subject and saved the item to
check how it works. when I check the item it is nopt there in my folder but
found under the Drafts. Is there anythin else needs to be done?
Thanks in advance.

Best regrds,
Nadeera




To create a new item in a non-default folder programmatically, use the Add
method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName")

The message class parameter is optional.

You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to
walk the folder hierarchy and return the MAPIFolder corresponding to a given
path string.

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.pu
blic.outlook.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

Use the Move method to move the item to the desired folder. Messages are always saved in drafts.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top