Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

working with word doc. C#

$
0
0

I have a word document that I want to populate existing tables.

I have to use the following instruction multiple times in an operation.

string templete1 ="C:\\Quote Project Templetes\\"+Settings.Default.string_FileOpen +".docx";Word.Application wordapp =newWord.Application();
            wordapp.Visible=true;Word.Document document = wordapp.Documents.OpenNoRepairDialog(templete1);
            document.Activate();Word.Table table1 = document.Tables[2];

I don't want to open another file I simply really only need to access another existing table however to do so I need to declare another wordapp, document and templete. This doesn't work.

Any suggestions or clarification of what needs/can be done.

Thanks in advance.

Tc


tac


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>