I have to create contact, Journal, Calendar, Task in a pst file.
(i use aspose.email V2.1 .net)
1 - I create a contact or a calendar or a task or a journal
Dim Calendar As MapiCalendar = New MapiCalendar()
Dim contact As MapiContact = MapiContact.FromVCard(strMsgFile)
how to convert MapiContact to MapiMessage ?
msg as MapiMessage= contact.GetUnderlyingMessage() does not work !
2 - I filled the information
Calendar.Location = “here”
etc. …
3 - problem
how to convert a Calendar/appointment or contact in a object objMapiMessage as new MapiMessage (Calendar/Contact ??) ?
4 - I save the file objMapiMessage in a PST
// Select the “Calendar” folder
FolderInfo
CalendarFolder = pst.RootFolder.GetSubFolder(“Calendar”);
ContactFolder = pst.RootFolder.GetSubFolder(“Contacts”);
// Add some messages to “Calendar” folder
CalendarFolder.AddMessage(MapiMessage.FromFile(???));
ContactFolder.AddMessage(MapiMessage.FromFile(???));
thanks
marc wolf
T-Soft@mail
Hi Marc,
Thank you for using Aspose.Email and we are sorry for a delayed response.
Regarding adding calendar item to a PST, you can follow the code sample as follow:
Appointment appointment = new Appointment("Meeting Room 3 at Office Headquarters", // Location
"Monthly Meeting", // Summary
"Please confirm your availability.", // Description
new DateTime(2012, 10, 2, 13, 0, 0), // Start date
new DateTime(2012, 10, 2, 14, 0, 0), // End date
"from@domain.com", // Organizer
"attendees@domain.com"); // Attendees
// Save the appointment to disk in ICS format
MemoryStream memStream = new MemoryStream();
appointment.Save(memStream, AppointmentSaveFormat.Ics);
MailMessage mailMsg = new MailMessage();
mailMsg.AddAlternateView(appointment.RequestApointment());
MapiMessage mapiMsg = MapiMessage.FromMailMessage(mailMsg);
// Create new PST
PersonalStorage pst = PersonalStorage.Create("EMAIL_414655\\Test.pst", FileFormatVersion.Unicode);
// Add new folder "Calendar"
pst.CreatePredefinedFolder("Calendar", StandardIpmFolder.Appointments);
FolderInfo folderInfo = pst.GetPredefinedFolder(StandardIpmFolder.Appointments);
folderInfo.AddMessage(mapiMsg);
For your other requirements of creating Contact, Task and Journal in PSt, please spare us a little more time as we are currently analyzing these and will get back to you soon. We appreciate your patience in this regard.
Hi,
thanks a lot for your help.
We would like to be able to add all other items type (contact, task, journal,…), but the most important is Contact.
Is it possible ? because we are doing a software that must save in a pst different type of message items. Most important are Mail, Contact and Calendar (Apointement and task).
Question: Outlook saves the different elements in various formats.
For example, it is possible to save contacts in a format msg or msg unicode or vcf or oft or txt. Is it possible to load these files into the MailMessage object as a parameter specifying the file type, for example MailMessage(pathFile,IPM.Contact) ?
thanks
Regards
marc
Hi Marc,
We have contacted our development team in order to get information about the creation of Contact, Journal, and Task in the PST, and would like to share with you that these features are not supported at present. However, we already have these in our implementation plan, and would be able to provide these features in the first half of 2013.
I created different elements in different formats using Outlook 2010 and then tried to load them back to Outlook using same formats (TXT, RTF etc.) but could not succeed. Similarly I tried to load them using Aspose.Email and am afraid to inform that currently there is no feature available which can read these formats.
We are sorry for any inconvenience caused to you and appreciate your patience in this regard.
Hi,
Thank you for using Aspose.Email.
I would like to inform you that I have linked this thread to issue ID: NETWORKNET-33392, which has been already logged in our database for the implementation of these features. Once these features are implemented, you will automatically get notification on this thread.