VBA copy and paste

D

Darach

I am working on an application using Word 2003. I am familar with VBA using
Excel and Access, but not with Word.

The application I am working on is a word doc that reads data in from a
database. It can be any number of pages long and each page will be in the
exact same format (consisting of tables, labels and text boxes). What I need
to be able to do is write a macro that on can copy and paste the first page
on to other pages, depending on how many are required (this will be done on
startup).

Can anyone help?

Thanks

Darach
 
J

Jonathan West

Hi Darach,

I would create an AutoText entry out of the first page and then insert that
as many times as needed.

You can create an AutoText entry by hand. (Make sure you store it in your
template rather than in normal.dot). Then, to insert it, you use the
ActiveDocument.AttcachedTemplate.AutoTextEntries("Your Autotextname
here").Insert method to insert it at the appropriate location in the
document.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top