SPFile "Content Type ID" is default even after changing programmatically when excel has macros

265 views Asked by At

Below is the code used to update the content type of an spfile.

newFile.Item["Content Type ID"] = spWeb.ContentTypes["Subject Attachment"].Id; newFile.Item.Update();

but "Content Type ID" for the attachment file is assigned default value when the excel file has the macro.

How do i change the code such that it does not take the default "Content Type ID" when excel file has macro.

NOTE: This behavior is observed only when attachment file has macro.

0

There are 0 answers