Using Excel & Word 2003.

T

tripscott

I am cross posting this because I haven't gotten an answer in the excel
programming group.

Using Excel & Word 2003.

I have a spreadsheet that contains a lists of part numbers. Each part
number has a corresponding Word document. Currently I have Excel open
that document in Word. A Word macro checks the value in a table's cell
and if the cell is blank, enters "A" and then saves the document. What
I need to program in now is if this happens to write the part number in
a different spreadsheet (same workbook) in Excel. I can't seem to
figure out how to send a variable from Word to Excel.


Can anyone help me out? Thanks a bunch.
 
J

Jay Freedman

Since both Word and Excel use VBA, you can have one macro do all this work.
I'd suggest that the macro should run in Excel, not in Word -- but it can
still open Word documents and manipulate their contents. That same macro can
then write to another spreadsheet of the workbook. An example of an Excel
macro that does things in Word is at
http://www.word.mvps.org/FAQs/InterDev/ControlWordFromXL.htm.

If you need more help with this, post the code of the existing Word macro.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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