|
-
Feb 27th, 2007, 07:37 PM
#1
Thread Starter
Member
[2.0] Creating MS Word documents & using app data to fill it in
I could use some assistance on this subject.
Here's the link I was following to create a MS Word document:
http://www.c-sharpcorner.com/UploadF...romDotNet.aspx
It leaves me slightly confused because I'm not sure how to incorporate how I want the page to be formatted in c# code (even with using macros in MS Word).
The situation:
I'd like to create a standard MS word document in my c# app then fill up that document with data provided by my app.
The document would be formatted as such, in MS Word:
Tools -> Letters and Mailing -> Envelopes and Labels
[Label Tab] -> Label Type: Avery Standard, 5160
This should result in a single page document, broken up into 30 labels per page (3x10).
Now, I have a DataSet in my app that has the following columns:
Name
Address1
Address2
Address3
This DataSet can have anywhere between 1 and an infinite amount of rows. The names themselves have no specific sequence.
What I'd like to do is go through each row and place each mailing address into one of the labels. When the page (30 labels) gets full, it would make a 2nd page and continue on.
I am 100% completetly lost on how to do this. Looping through each row and performing x task is not a problem. It's knowing what kind of "MS Word Code" I have to do so it knows to enter that row's data into the next open label -- then switch to page 2 when page 1 fills up.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|