Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

VBA copy and paste

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Darach - 31 Jan 2005 18:18 GMT
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
Jonathan West - 31 Jan 2005 20:24 GMT
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.

Signature

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.
[quoted text clipped - 14 lines]
>
> Darach
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.