C 對Word的操作 一

2021-05-12 22:57:06 字數 695 閱讀 5221

前提:

匯入com庫:microsoft word 11.0 object library.

引用裡面就增加了:

object start = 0;

object end = 0;

word.range tablelocation = odoc.range(ref start, ref end);

odoc.tables.add(tablelocation, 3, 4, ref omissing, ref omissing);

object start = 0;

object end = 0;

word.range tablelocation = odoc.range(ref start, ref end);

odoc.tables.add(tablelocation, 3, 4, ref omissing, ref omissing);

word.table newtable = odoc.tables[1];

object beforerow = newtable.rows[1];

newtable.rows.add(ref beforerow);

object start = 0;

object end = 0;

word.range tablelocation = odoc.range(ref start, ref end);

C 對Word的操作 三

object start 0 object end 0 word.range tablelocation odoc.range ref start,ref end odoc.tables.add tablelocation,3,4,ref omissing,ref omissing word.tab...

C 對Word文件的部分操作筆記

c 對word文件的部分操作,主要是在web服務中對word進行的操作 使用的microsoft.office.interop.word.dll 12版 對office2003進行的一些操作。在進行word文件操作前先使用 using microsoft.office.interop.word 定義...

c 操作word文件

最近由於工作需要,做了一些關於c 操作word文件方面的工作 主要是對word中 的操作,以下是部分 關於操作不規則 的 using system using system.collections using system.componentmodel using system.data using...