VBA copy and paste  
Author Message
Hmmm





PostPosted: Mon Jan 31 14:24:49 CST 2005 Top

MS Word VBA >> VBA copy and paste

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

Word120  
 
 
Jonathan





PostPosted: Mon Jan 31 14:24:49 CST 2005 Top

MS Word VBA >> VBA copy and paste 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.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup




>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
>