object patentSortnum = "patentSortnum";
doc.Bookmarks.get_Item(ref patentSortnum).Range.Text = strs[3].ToString();
word 中是不是要建立标签啊 ,里面我也写上了
C# 把数据录入 word中出错 说是集合要求成员不存在 ?????求助啊
object[] a = new object[]{
"PatentName","PatentNum","PatentRegDate","patentSortnum","TradeClass1","TradeClass2","TradeClass3","TradeClass4","TradeClass5","TradeClass6","TradeClass7","TradeClass8","TradeClass9","Proposer","ProposerClass1","ProposerClass2","ProposerClass3","ProposerClass4","ProposerClass5","BankName","Accounts","Address","Phone","LinkMan","Mobile","UnitClass1","UnitClass2","UnitClass3","UnitClass4","PrizeClass1","PrizeClass2","PrizeClass3","PrizeClass4","PrizeClass5","PrizeCountrys","PrizeClass6","PrizeClass7","PrizeClass8","PrizeClass9","PrizeClass10","PrizeClass11","PrizeClass12","PrizeClass13","PrizeOthers","datum1","datum2","datum3","datum4","datum5","datum6" };
object[] b = new object[50];
SqlParameter p = new SqlParameter("@hid", hid);
SqlDataReader sr = SqlHelper.ExecuteReader(SqlHelper.CONN_STRING_NON_DTC, CommandType.Text, "select * from NewHortation1 where NewHortation1Id=@hid", p);
if (sr.Read())
{
b[0] = sr["PatentName"].ToString();
if (Convert.ToInt32(sr["PrizeClassid"]) == 4 || Convert.ToInt32(sr["PrizeClassid"]) == 5 || Convert.ToInt32(sr["PrizeClassid"]) == 15)
{
b[1] = sr["PatentNum"].ToString();
}
else
{
b[1] = "ZL" + sr["PatentNum"].ToString();
}
b[2] = Convert.ToDateTime(sr["PatentRegDate"]).ToString("yyyy年MM月dd日");
b[3] = sr["patentSortnum"].ToString();
word 中 没有添加 标签原因