Closed ProxBiz closed 2 years ago
Do you have an example file so that I can have a look inside? Making a contact file is nothing more than figuring out the properties that are needed and implement these in a new contact class.
In my trials I have kind of made a contact. I could read the content with MSTReader from your other repository but when double clicking and opening with outlook I receive a Could not read Item warning. Tried putting together some things from the MSGReader and look at the FileStream but I couldn`t convert to something that I understand. I have attached a contact with all the properties from outlook as .msg and .msg unicode. Thank you for the response and help.
Any updates or some documentation you can refer me so I can try it myself ? Regards
Sorry about the late response (to busy with work).
What I would do is;
#region WriteToStorage
/// <summary>
/// Writes all the properties that are part of the <see cref="Appointment"/> object either as <see cref="CFStorage"/>'s
/// or <see cref="CFStream"/>'s to the <see cref="CompoundFile.RootStorage"/>
/// </summary>
private new void WriteToStorage()
{
Class = MessageClass.IPM_Appointment;
NamedProperties.AddProperty(NamedPropertyTags.PidLidLocation, Location);
NamedProperties.AddProperty(NamedPropertyTags.PidLidAppointmentStartWhole, MeetingStart);
NamedProperties.AddProperty(NamedPropertyTags.PidLidAppointmentEndWhole, MeetingEnd);
NamedProperties.AddProperty(NamedPropertyTags.PidLidMeetingType, MeetingType.mtgRequest);
NamedProperties.AddProperty(NamedPropertyTags.PidLidAppointmentSubType, AllDay);
NamedProperties.AddProperty(NamedPropertyTags.PidLidAppointmentStateFlags, AppointmentState.asfMeeting);
}
#endregion
Create the MSG file and see If Outlook wants to open it without errors
I already made a start with the Contact class (59558fc6c4139104be8c91418a132e4baa5bb018) to show you how it is done. If you need any help then just post a question in this issue.
It is not difficult to make, it is just hard to figure out what properties are needed and how to map them.
Thank you for the replay, will give it a shot tomorrow.
@ProxBiz : You can stop your own effort (if you even started :-) ) I'm about 80 procent done with implementing the contact card. With some luck it will be finished next week.
https://github.com/Sicos1977/MsgKit/commit/27bcd571adaba103196bb02595035b1a791a7240
Haha, thanks for the heads up, i was 30% in the process. Wanted to follow your good coding practice so i can branch and merge my changes. I will be following the next updates. Thanks and have a great weekend.
Thank you for the coding practice complement. Always try to keep it as decently as possible. I also work in projects with more then a million lines of code and then it is always nice if you have good structured code that is easy to read.
All the properties are added, now it will be testing test and testing to make everything work and keep Outlook happy. Feel free to test.
looks good on my end, can you post new nugget package ?
Not now because everything is not working as it should, that needs to be fixed first.
I hope to finish the contact option this week, work was to busy to do anything last week.
No problem, i understand you have other things to do. Take your time
Hello, Any chance of implementing or a hint on how to create a Contact .msg file with this library. Wanted to extend it myself but having problems. Regards