PDA

View Full Version : Solved: Feed Word with changing data from excel



grohm
05-21-2007, 06:55 AM
Hi all!

First of all, i'm not talking about the usual mass-mail thing where you can get the data from a excel file etc.

basically i have a document and a excel file. in the excel file i have certain fields (name, adress, etc.) wich should be exported into the word file. it would be cool if i could have a button in excel which opens up the word file when pressed and inserts the data from excel. basically i want to have a lot of buttons whih open up a lot of different docs and fill them with info. the word file is already a formatted letter (actually its a contract).

i just want to know if:

1) this is possible
2) a code example how to "export" the excel data into word. i know thats possible somehow since its all based on xml, i just dont know exactly how to do....


would be great if somebody could give me an example....


cheers and thanks,

ben

mdmackillop
05-21-2007, 10:25 AM
Mailmerge would appear to be the simplest way to achieve this. You could copy selected Excel data to a source range within Excel and open the Word document which links to this range.

Charlize
05-21-2007, 11:34 AM
Maybe take a look at this thread ? http://vbaexpress.com/forum/showthread.php?t=12181

grohm
05-22-2007, 12:55 AM
Maybe take a look at this thread ? http://vbaexpress.com/forum/showthread.php?t=12181

Thanks to you 2!! Charlize, that thread looks exactly like what i was looking for. Thx for your help!!!! :beerchug: