Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default embedded Word document

I'm stuck. I'd definitely appreciate any help someone could offer!

I have an embedded word document on a worksheet - it's embedded as an
icon, not as a link. In a second worksheet (within the same workbook)
I would like to have the user open the embedded document from a
button. But I'm stuck as to how to write the VBA code to open it....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default embedded Word document

Try something like

Sub OpenWordDoc()
Dim OLEObj As OLEObject
Set OLEObj = Worksheets("Sheet1").OLEObjects("TheWordDoc")
OLEObj.Verb xlVerbOpen
End Sub

Where Sheet1 is the sheet with the Word document and "TheWordDoc" is the
name assigned to the Icon. If you have only one OLEObject on Sheet1, you can
use

Set OLEObj = Worksheets("Sheet1").OLEObjects(1)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

wrote in message
ups.com...
I'm stuck. I'd definitely appreciate any help someone could offer!

I have an embedded word document on a worksheet - it's embedded as an
icon, not as a link. In a second worksheet (within the same workbook)
I would like to have the user open the embedded document from a
button. But I'm stuck as to how to write the VBA code to open it....


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
Printing Embedded Word Document Mark Excel Programming 0 May 16th 06 08:54 PM
Embedded Word document bforster1 Excel Discussion (Misc queries) 0 November 2nd 05 08:50 PM
Automate Embedded Word Document Peter Graney Excel Programming 0 August 12th 04 06:01 PM
Read embedded word document by VBA rs Excel Programming 0 August 26th 03 04:33 PM
Read embedded word document rs Excel Programming 0 August 22nd 03 07:24 PM


All times are GMT +1. The time now is 10:26 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"