views:

16

answers:

1

Hi, I am trying to add a multi-line text field to a document within Sharepoint but can't currently figure out how to do it. Below is the code i have which works for most of the fields.

SPFile file = folder.Files.Add(*snip*);
    file.Item[guid] = stringValue;
    file.Item.SystemUpdate(true);

The document adds with no issues the problem is just adding multi line meta data to the file. Any help on this would be greatly appreciated.

Many Thanks,
Piercy

+1  A: 

Multi-line fields (such as Keywords) simply expect a carriage return + new line pair to separate out each line:

SPFile file = folder.Files.Add(*snip*);
file.Item["Keywords"] = String.Format("One{0}Two{0}Three", Environment.NewLine);
file.Item.SystemUpdate(true);
Goyuix
Seems i was thinking a bit to complex. Should of realized that myself i was trying to pass it arrays and all sorts. Thank you.
Piercy