D
Don
Hello!
I am writing a system in Access 2002 (I am an experienced
programmer but new to Automation) One of the functions of
this project is to create a report in Word from a
combination of data and related Word documents using two
templates - one for the report header and one for the
detail. I have been able to successfully create each of
the documents from the templates, but I don't know how to
blend the two together. Here is the scenario:
I start Word and create a document (oDocMain) from my
header template. (Successful)
I open my detail template and create a document
(oDocDetail) and populate it with detail data using
bookmarks and a database record. (Successful)
Next I want to select all the text (including formatting)
from oDocDetail and paste it at the end of the oDocMain.
I will repeat this behavior through a loop statement
until all the detail records have been read and save the
oDocMain as the report.
Can someone give me the coding needed to select all the
text in the oDetailDoc and copy and paste it into
oDocMain? This is what I'm stuck on. I have the rest of
the process working.
Thanks TONS in advance!
Don
I am writing a system in Access 2002 (I am an experienced
programmer but new to Automation) One of the functions of
this project is to create a report in Word from a
combination of data and related Word documents using two
templates - one for the report header and one for the
detail. I have been able to successfully create each of
the documents from the templates, but I don't know how to
blend the two together. Here is the scenario:
I start Word and create a document (oDocMain) from my
header template. (Successful)
I open my detail template and create a document
(oDocDetail) and populate it with detail data using
bookmarks and a database record. (Successful)
Next I want to select all the text (including formatting)
from oDocDetail and paste it at the end of the oDocMain.
I will repeat this behavior through a loop statement
until all the detail records have been read and save the
oDocMain as the report.
Can someone give me the coding needed to select all the
text in the oDetailDoc and copy and paste it into
oDocMain? This is what I'm stuck on. I have the rest of
the process working.
Thanks TONS in advance!
Don