View Single Post
  #1   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.vba.general,microsoft.public.word.vba.userforms,microsoft.public.word.vba.beginners,microsoft.public.word.tables
TomorrowsMan TomorrowsMan is offline
external usenet poster
 
Posts: 4
Default Index Match in Word Table, or Embedded Excel?

Hello there,

Is it possible to use Index/Match in a Word Table, or otherwise return
the formula result from an embedded Excel table to a word document
bookmark/formfield?

I have had a hard time figuring out how to take Word document bookmark
values, get them into some form of embedded Excel workbook, have
calculations run on them, then return the results to other bookmark
fields in the Word document.

I also tried embedding the Excel data in a userform (using the Excel
10.0 object) and retrurning it that way, but was simply baffled by the
vba syntax; for instance, I tried this:

excelsheet1.Spreadsheet1.Sheets("Sheet1").Range("A 25").Text = _
ActiveDocument.FormFields("EEIndex").Range.Text
msgbox excelsheet1.Spreadsheet1.Sheets("Sheet1").Range("A 25").Text

The msgbox pops up with the correct value, assuring me I coded the
first part correctly, but the bookmark ("EEIndex") does not populate
with the value.

Any direction or assistance would be greatly appreciated....!

Chris