View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed[_18_] Ed[_18_] is offline
external usenet poster
 
Posts: 118
Default Creating Word Documents with an Excel Macro

Most of the purchase orders I've seen have been a basic template like a
document with a header and a footer and a blank middle for the order stuff.
So why not stay in Excel to build the middle, using a macro to put his
choices into either a blank workbook or a P.O. template workbook? That way,
you can add formulas to total quantities and prices, maybe even calculate
shipping. Then the last macro can copy that range to the clipboard and
create a new P.O. based on your Word P.O. template, and paste all your info
into the middle. The last part would be handled by copying your Excel, then
opening a Word doc and stepping the a macro recording to paste and format
how you want, then setting that code into your P.O. template as an AutoNew
event macro.

Ed

"The Wonder Thing" wrote in
message ...
Hello everyone,

I don't know if this is possible, but I have a feeling it is from the

little I've read about it.

What I'd really like to do is write a couple of macros that could be run

from custom buttons with happy-little user-friendly symbols, I'd put on my
Boss's computer so he could understand them. ;)

That part's easy, but the actually macros I have no idea how to do. I want

to have one button open / create an Word document template of a purchase
order. The Purchase Order has sections for Part Name, Part Number, Cost,
Last Ordered, etc., and so does the record in excel, so I'd like the second
button to add the current record to the purchase order.

Basically, he'd be looking through the partlist, finding something we need

to order, clicking the "Make P.O. Button", then clicking on each record
seperatly (activating the cell), and clicking the "Add to P.O." button to
put the record onto the P.O. From there he could print it, and everything
would be wonderful.

Any suggestions. I'm getting pretty good at macros within excel (I think),

but I know nothing about working with other applications.

Thanks in advance!