HI all,
i have gone through this code sharing its wonderfull, could
some body help me how to disable a particular Formfield (ex) lblFaxPhysTo i have used the below code to disable the control but no luck
loading the document and assigning the values and all done. am strucked here only
if (oWordDoc.Bookmarks.Exists("lblFaxPhysTo"))
{
object bookmarkName = "lblFaxPhysTo";
((Microsoft.Office.Interop.Word.FormField)oWordDoc.FormFields.get_Item(ref bookmarkName)).Enabled = false;
oWordDoc.Bookmarks.get_Item(ref bookmarkName).Range.Bold = 1;
oWordDoc.Bookmarks.get_Item(ref bookmarkName).Range.Font.Size = 8;
}
my requirements are:
*
the word document should be read only,and it also should allow some of
the fields to edit.... waiting for reply thanks in advance
Thanks,
|
|
|
|
|
S.Devanathan |
Suthish NairPosted Nov 19, 2010, 1:49 PM
http://social.msdn.microsoft.com/Forums/en/vsto/thread/7671f454-8614-48f4-90ac-6e21af1e316d
http://vbatocsharp.blogspot.com/2010/07/refernce-collection-f-fileds-file.html