Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and paste into Excel and Word | Excel Discussion (Misc queries) | |||
copy & paste from Excel to Word | Excel Discussion (Misc queries) | |||
COPY & PASTE WORD Doc into EXCEL | Excel Discussion (Misc queries) | |||
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 | Excel Programming | |||
Copy And Paste From Excel To Word | Excel Programming |