Help getting txt value from Word selection.copy

Reply

Join Date: Jul 2008
Posts: 3
Reputation: gggchurch is an unknown quantity at this point 
Solved Threads: 0
gggchurch gggchurch is offline Offline
Newbie Poster

Help getting txt value from Word selection.copy

 
0
  #1
Nov 16th, 2008
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
Last edited by gggchurch; Nov 16th, 2008 at 4:45 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 3
Reputation: gggchurch is an unknown quantity at this point 
Solved Threads: 0
gggchurch gggchurch is offline Offline
Newbie Poster

Re: Help getting txt value from Word selection.copy

 
0
  #2
Nov 17th, 2008
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...
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC