Excel VBA

G

gimolu

HI,

I need some help building a macro.
In excel let's suppose that I have the following table:

Product Description Quantity Path to
details
Product 1 0\\server\product1_description.doc
Product 2 1\\server\product2_description.doc
Product 3 2\\server\product3_description.doc

Now, I want to have a button that when someone clicks on it, it will call a
macro that verifies the Quantity column and if the quantity is >=1 it will
generate a word document and merge the product description (path to details
column) of the products that have a quantity >=1.

I have no idea where to start... I can't find the write vba command to merge
multiple .doc documents.
Any help would be much appreciated!

By the way, I started the macro with this lines of code:

Set wordapp = CreateObject("word.Application")
wordapp.documents.Open "d:\test.doc"
wordapp.Visible = True

This will create the "Main" document. I don't know how I can merge other
..doc in this "Main" file.
Thanks in advanced.

Luis Ramos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top