Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Inserting and copy from a word object in Excel


Hi,

I am using Excel 2002 and I insert a word object in my spreadsheet. What I
want to do is copy some text from the same spreadhseet below either from
Excel or from another word object and paste it into a word object at the
very top. (See below what I want to paste into the word object). I can do
this using a command button - macro, but How can I do this? Any tips will
be appreciated. Thank you.


Name
Classification
Area
Zone



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Inserting and copy from a word object in Excel


Hello Alex

I'm not sure to understand but i hope this example help you



Dim WordApp As Object
Dim WordObj As Shape

Application.ScreenUpdating = False

'suppose Word Object is the first object in the sheet
Set WordObj = Worksheets(1).Shapes(1)
Set WordApp = WordObj.OLEFormat.Object.Object.Application

'goto the fist line in the Word Object
WordApp.Selection.GoTo What:=wdGoToLine, Which:=wdGoToAbsolute,
Count:=1
'insert datas
WordApp.Selection.TypeText Text:="essai d'insertion" & vbLf &
Range("A1") & vbLf

Range("A1").Select
Application.ScreenUpdating = True



Regards ,
michel


--
michelxld
------------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=399354

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
Inserting word object - Missing the comment feature in ribbon J. New Users to Excel 0 September 16th 09 04:06 PM
excel object linked to word will not add sums in word Robin Excel Discussion (Misc queries) 0 March 31st 09 11:10 PM
Inserting a MS Word object into an Excel spreadsheet (2 questions) Phrank Excel Worksheet Functions 1 December 28th 07 02:22 PM
Issues inserting wide Word object into Excel kar Excel Discussion (Misc queries) 0 November 30th 07 10:10 AM
Inserting Excel OLE Object raven Excel Programming 2 September 15th 05 01:56 PM


All times are GMT +1. The time now is 05:15 AM.

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"