Hi to everyone,
I need to create and print (from within a c# application) a MS Word
document starting from an Access db.
Half of this document must be written and printed in, let's say,
January, then some data will be added to the db and, let's say in
June, a second part must be written and printed on the same sheet of
the first one.
In other words, the second time I print the document only some
specified parts (everytime the same) of it must be printed.
Moreover, I need to print this document on a pre-printed template, so
I've to put some text and tables on well defined places: I know how to
place text (using bookmarks), but I'm not able to insert tables
correctly (they are placed at the same height of the bookmark, but
always on the left margin of the page).
This is a piece of the code I've written to manage tables:
Word.Document aDoc = WordApp.Documents.Open(....);
..
..
..
object bknTableName = "Table1";
Word.Table table = aDoc.Tables.Add(aDoc.Bookmarks.get_item(ref
bknTableName).Range, 3, 2, ref missing, ref missing);
The questions are:
1) How can I place tables on the page respecting the layout of the
template?
2) How can I print specified parts of the document, ignoring the
remaining ones?
Thank you