Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I have a single page template, say it's for an employee ID, and my database has 5 records. My goal is to print off the employee ID's, and have a word document with 5 pages. Each page will be based on a template. (VB.Net by the way)

 

I have the template created, and have bookmarks setup to locate the text insertion points. I can create the first page very easily; goto bookmark, insert text, repeat. Although, I'm stuck now that I want to create the second page.

 

Ideally, I would like to insert a new page based on my template. I can't create everything on the fly, as that will make using a template pointless.

 

 

 

EDIT:

I found a solution, although I'm not very happy with it. For each record/page of the report, I create a new document based on a template and save it; and then dumb all of those pages into a master document. It's slow, but does give the power, and was easy to implement. I KNOW there is a better way - like my creating the document in memory and copy into a document via a range, but getting the right combo of code has been rather elusive.

 

Help and suggestions are definitely welcomed and highly recommended :)

Edited by corpse
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...