Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Word question 2

Status
Not open for further replies.

trent101

Programmer
Nov 4, 2005
50
0
0
AU
Hey,

I have a word document which is about thirty pages long.

Throughout this word document there are places where data is to be inserted. eg [client name].

Now at the moment I open the word document and manually insert the information from a simple text file which is sent to me from the client.

I am just wondering is there any way at all to automate this process? Can I have those fields [client name] set as varibles that change or anything like that?

I understand this may not be possible but if anyone has any ideas at all that could help me out I am all ears.

Thanks for your time.

 
Hi trent101.
Have you considered using Mail Merge? You could enter the information into a table held in another Word document, or in an Excel spreadsheet, and then use Mail Merge to pull this into your main Word document.


Legal IT Forums
Free technical forum for Legal IT professionals

 
Mail Merge is a likely option, especially if you have multiple documents that are data sources.

There are a number of other options though. It really depends on the situation. Are you going to be doing this a lot? How much work do you want to do? How is the text file formatted?

The simple answer though is...yes. Absolutely you can make those fields (eg. client name) as fields that will take data from a text file. Yes, you can automate the process. To spell out details though would require more detail on your situation.

Gerry
My paintings and sculpture
 
Ok, firstly thanks for the reply. It is much appreciated.

Now to exlain my situation in detail. I actually have a webpage that has a form which the user can fill out and submit. Once they submit the form, the data is saved to a mysql db and also the info is sent in an email to me.

This is done using asp.net, c# language.

Now for every time this happends I would like the data merged into my word document. This may happen from a couple of times to 10 or 20 times a day.

I am not really a really strong asp.net programmer but I should be able to get the data in a text file of some sort I think.

I have not really heard of "mail merge" before but I will have a read up on it now. Cheers for your help.
 
Hi trent101.

Mailmerge is probably what you need by the sounds of it. If the data is held in the body of the email, rather than as an attachment, you'll need to copy and paste it into an Excel or Word document that will be your Data Source. If it already comes attached in a file format you can work with (Word, Excel, CSV, etc.) then you'll just need to save that file locally and go from there.

Legal IT Forums
Free technical forum for Legal IT professionals

 
There are numerous ways to insert data as a variable into a document. The easiest is mail merge. The key is to remember your data must be in a defined field. If your data is all matter that would be in an address book, you can create a simple database in Word to handle the problem. Check out Word help for mailmerge procedures. Google "ms word mail merge" and you get plenty of help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top