I've searched for an answer but cannot find one so excuse me if this has been answered.

This is in Word 2003.

I have a two column table. The macro in question runs from the right column, selects the name of a file from the same row left column and then inserts the contents of that file into the cell it originated in and moves down one cell.

Problem is I cannot get the value of the file name from the select.copy performed on the left cell to asign it to a variable to be included in the selection.insertfile method.

I've tried using DataObject but this is not supported (Compile Error: User defined type not defined).

Any help appreciated.

ggg

Hate to answer my own question but...

strvar = selection.text

gets the value into a variable...
Now for some reason insert.file will not find the file name, with complete path in macro mode. I works fine manually but...

oh, well...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.