Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy text from excel and paste in word - Urgent Help


Hi,
I am copying range of text from Excel. I need to open a word document
and then find a text and replace that text with the copied text from
the excel. I am doing something like this.

lsValue="<*Text"
Set TheRange = rLoopCells.Offset(1, 0).Resize(lsRowValue,
lsColumnValue)
TheRange.Select
TheRange.Copy
'Find the text and paste the copied text
With moDocument.ActiveWindow .Document.Content.Find.Text = lsValue
'.Selection.Find.ClearFormatting
'.Selection.Find.Forward = True
'.Selection.Find.Text = lsValue '.Selection.Find.Execute
'If .Selection.Find.Execute(lsValue) Then If
..Document.Content.Find.Execute(lsValue) Then .Selection.PasteSpecial
MsgBox "Found"
End If
End With

But I am unsuccessful. Any help would be greatly appreciated.

Thanks in advance.
Sanjay.


--
sippy
------------------------------------------------------------------------
sippy's Profile: http://www.excelforum.com/member.php...o&userid=35084
View this thread: http://www.excelforum.com/showthread...hreadid=548346

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy and paste into Excel and Word damonp3 Excel Discussion (Misc queries) 0 March 5th 09 06:55 PM
copy & paste from Excel to Word HeliBarry Excel Discussion (Misc queries) 1 February 29th 08 01:00 PM
COPY & PASTE WORD Doc into EXCEL cynjor312 Excel Discussion (Misc queries) 3 November 5th 05 12:28 PM
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro Steven Excel Programming 1 October 17th 05 08:56 AM
Copy And Paste From Excel To Word Kris Taylor Excel Programming 4 July 22nd 04 03:11 AM


All times are GMT +1. The time now is 02:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"