How to Edit NSF file using c#?

Posted by Preeti on Stack Overflow See other posts from Stack Overflow or by Preeti
Published on 2009-11-11T09:28:35Z Indexed on 2010/03/13 10:15 UTC
Read the original article Hit count: 542

Filed under:
|
|

Hi,

I want to programaticaly change some values to NSF item and then want to save it.(i.e to edit NSF File and then save the editions)

for example:

I want to set Sender name of all mails to "[email protected]".(Using Domino.dll).

Solution I tried: (Swaping of To and From values)

String Temp_From = ((object[])docInbox.GetItemValue("From"))[0] as String; String Temp_SendTo = ((object[])docInbox.GetItemValue("SendTo"))[0] as String; docInbox.ReplaceItemValue("From", Temp_SendTo); docInbox.ReplaceItemValue("SendTo", Temp_From); docInbox.Save(true, false, false);

/* Applied for following fields also:

For From: AltFrom,DisplayFrom,DisplayFrom_2,dspFrom,ForwardedFrom,INetFrom,tmpDisplayFrom

For To : displaySendTo,EnterSendTo,Envelope_to,tmpDisplaySendTo

Also Tried for saving : docInbox.Save(true, true, true); */

In above code after successful editing changes values are not reflected in Nsf File. But when i am reading edited Nsf (copying modified file on different location ) file programatically it is showing changed values.(Why changes are not visible here ?)

© Stack Overflow or respective owner

Related posts about lotus-notes

Related posts about c#