Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

How To Extracte Embedded File Object In Word.

Hi! HOw Can I extract and Save embedded file in Microsoft Word using Visual Basic.

For exmaple I have a Word File and I insert an Object File as an Icon...
If we open the Word File and I click the Icon.. I will be able to save this file right? This is What I want to do in Visual Basic.



View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Need Help! How To Create A Word Object Embedded In A Form?
Hi there! I know how to create a word object, my project opens Microsoft Word and pastes there, but how could I make it an embedded word object? And something else... When I paste using .selection, my whole page is selected. How do I remove (not delete) the selection?
Thanks in advance!

How Do I Create An Embedded MSPaint Object Into A Word Document **with Certain Attributes
I'd like to be able to create an embedded MSPaint object into a Word Document.

Sub BMPembed()
' Macro recorded Thursday, December 15, 2005 by Room1Box
    Selection.InlineShapes.AddOLEObject ClassType:="PBrush", FileName:="", _
        LinkToFile:=False, DisplayAsIcon:=False
End Sub

The resulting .bmp has these attributes:
Default width = 150, Default Height = 142 (pixels)
Default = full color

Is it possible to change them to width 600, height 250, black and white via scripting ?


Edited by - on 12/16/2005 6:10:06 AM

How To Update A Embedded Object To Its Original File?
Hi, I need somebody help or advises that how to update or save the changes I have made to an embedded object in a container to its original file!


Using An OLE Embedded Ms Word And Writing From It To A File
Thanks Sherwood, for the code, but it seems the code does not work.

It keeps giving me the error :

"Active X component cannot create object"

PLease i need ur help again.


Accessing Embedded Text File In MS Word

I am accessing a MS Word document programmatically in VB and attempting to save all embedded objects as files.

The embedded objects are all text files.

I am using ActiveDocument.InlineShapes(1) to access the first embedded object, but the object type (Prog ID) is reported as 'Package'.

I assume that this is because the Object Packager is being used internally to package the text file and embed it to word.

But I cant seem to manipulate the Package object (I cant even set a reference to it!).

If I manually open the embedded object in Object Packager I can save the text file.

I want to do the same thing through code. Can someone help me on how to do this?


Saving An Embedded Excel Object From Access OleObject To A File
The following code fragment is my attempt to extract embedded documents from an Access database and save them as seperate files.
I am working in Access 2002, where the code works but it doesn't work in Access 2003 where I get an Excel 1004 Error. Ultimately, I want the file in Access 2000 format so it can be used by 2000-2003 users. When it breaks into Debug mode and I step through line by line it works fine.
Does anyone have any ideas? I've tried several ways of calling the Save As and keep getting the same error?
Open to better ideas, I need to repeat this process for Word and Powerpoint documents as well.
Also does anyone know why Access 2002 - 2003 doesn't let you embed Word documents into a table?

Private Sub Command0_Click()
'On Error GoTo err_Section

Dim objOLE As Object
Dim rs As Recordset
Dim strSQL As String
Dim strAppName As String
Dim strFilename As String
Dim wkb As Excel.Workbook

strSQL = "SELECT FileObject FROM tblFileObjects"
Set rs = CurrentDb.OpenRecordset(strSQL)
Do While rs.EOF = False
'Identify file type
Me.OLEBound = rs!FileObject
Set objOLE = Me.OLEBound.Object
strAppName = objOLE.Application
MsgBox objOLE.Application
'Filename assigned
strFilename = GetFileName()
If strAppName = "Microsoft Excel" Then
Do While Dir(strFilename & ".xls") <> ""
strFilename = strFilename & "1"
strFilename = strFilename & ".xls"
Me.OLEBound.Action = acOLEActivate
Set wkb = Me.OLEBound.Object.Application.Workbooks(1)
'wkb.SaveAs strFilename
'Tried this line too - same result
Forms![frmOleform].OLEBound.Object.Application.Workbooks(1).SaveAs "strFilename"
Set wkb = Nothing
Exit Do
End If
'If strAppName = "Powerpoint Presentation" Then
'Similar process for Powerpoint
'If strAppName = "Word Document" Then
'Similar process for Word.
End Sub

OLE Embedded Object/Object Packager Automation
I would like to mimic the action of double-clicking on an OLE Embedded object and opening it in the designated window. Thus when a slide show contains a slide with the object I would like to programmatically open the contents of the container. What I would like is advice as to how this can be done. With a Presentation with one slide and one OLE Embedded object, I have tried the following:

On a button event I call the following lines:

ActivePresentation.Slides(1).Shapes(1).OLEFormat.D oVerb 1

But I receive the error message:

Shape (unknown member): Invalid request. The window must be in slide or notes view.

I have also tried surrounding the above code with:

lOriginalView = ActiveWindow.ViewType
ActiveWindow.ViewType = ppViewSlide
' Do stuff.
ActiveWindow.ViewType = lOriginalView

But I receive the error:

Application (unknown member): Invalid request. There is no currently
active document window.

I have also looked into using SendKeys, ShellExecute and ActivateShape, as well as a third party control that exposes a slide’s events.


Embedded Object
hi expert.. How can i embedded an excel spreadsheet in word document?

|word ==> Textbox value

When i press enter button the textbox value will be inserted within the excel spreadsheet cells. How can i do that? also how can i do that repeately like this..

if button is clicked for the 1st time the value will be inserted in range A1
if button is clicked for the 2nd time the value will be inserted in range A2
if button is clicked for the 3rd time the value will be inserted in range A3
if button is clicked for the 4th time the value will be inserted in range A4
and so on..

please help me.. thank you

Embedded Word Documents And Word !?
I need to open an embedded word document (embedded in an access table) from vba access code , for editing in a word window ? can anyone help me with this ?

Xls-Object Embedded In Doc-Document
Hi guys,

I have a big problem and no clue what I should do know - hope you can help me. I crearted a VBA code in a xls-sheet, which activates a word- document and in this word- document it activates an xls-OLE-Object. Activating and insert data in the Object is no problem, but how can I deactivate the OLE-Object.
Until now the code looks something like that:

pfad = "C:..."

Set wdObj = getObject(pfad)



I look for something like "wdObj.InlineShape(1).Activate"

Saving An Embedded Object
I am embedding a software on an OLE control to get its graphical functionality available to me.
How do i save the changes i made on the OLE control to the source file used in the CreateEmbed method ?
For example, think you put Visio on a OLE control. Make a visio diagram. How do you save it ?
I might be doing something wrong with updating the source document cause it seems as if the source document and the drawing i made have no connection.

Thanks in advance,

How To Refer To Embedded OLE Object?
I have embedded a picture file in an OLE object. How do i refe to it? i.e. if I want to delete the picture while refreshing th page or if i want to perform some action using the IF claus depending on the picture embedded or if i want to save th picture using file system object etc. then how do i do it?

rite now i am using CreateEmbed to embed a new picture/object.

and no, i cant use picture control/image control for embeddin pictures since only OLE supports the format of pix i am using.

thanx in advance

XBase - Embedded Object
I've got an xBase or dBase IV/V .DBF file which I can open programmatically using the data control in VB 4.0. Only problem is that it's not giving me a full list of the fields.

There are two fields called DRAFT_OBJ and LIVE_OBJ which contain Microsoft Word files. Actually, I think, the fields contain links to a .DBT file which contains the actual Microsoft Word data.

My problem is that I can't get at those two fields to get the data. I have the same problem programmatically and in MS Access. Any suggestions?


Embedded .Doc S And Word !
How do I open an embedded .doc file (embedded as a field in a table) in word for editing from code ?

Embedded Excel Object In VB6 Activation
Ladies & Gents,

I'm sorry to post this because I normally keep trying until I work it out but this is killing me!!!

I'm placing an OLE Microsoft Excel Worksheet into my main form1. I want it to be active all the time so the user doesn't have to pass focus, or double click it, or anything else. I want them to be able to click the cell to be edited and hey presto.

I've read all about in place activation and seen a Microsoft KB article on how to do it in VB .Net but cant find it in VB6.

Can anyone please help me or suggest another way? I dont want to use the object method.

Thanks in advance for any help


How To Know What Properties Embedded In An Activex Object
I am always curioused.
For a while I browse this forum, I came accross some threads
regarding activex object such as excel and word objects.
I wonder how you all know all the properties and functions
for that particular object.

Someone told me to get a reference file for the object, but
where I am to get it for Excel and Word?

I know it's but any specific website for me
to grab a reference about Excel and Word object's properties
and functions?

Desperated, pls.


Unable To Create Embedded Object

When I try to use a form object with command button in
VBA project inside Microsoft Excel, I get "Unable to create Embedded object" error.

When I use the form object without command button, it loads.

I couldn't get what is wrong and where?


Extracting Embedded Object Using VBA In Excel
Hi All,

I have some embedded text files and compressed files in my excel spread sheet. I want to save them in a seperate folder as seperate files. How to do that using vba?

I tried using Oleobject it didn't work

Thanks in advance.

Subbu S

How To Get An Image From An Embedded OLE Object On RichTextBox ?
Hi all.

I have a RichTextBox control in my application which loads an RTF file.

I know that I can get OLEObjects from RichTextBox using its property OLEObjects, so I can get an embedded OLE object from my RichTextBox like this:

Set obj = RichTextBox1.OLEObjects(1)

But, how can I load the embedded image into a PictureBox ? I don't see any property or method from OLEObject for getting that image.

Can anyone help me, please?

Embedded Word In Excel
Hi i have and embedded word document in excel sheet. When i use "open" verb
on embedded document in excel,it will open this document for editing in
microsoft word.
Is there any posibility to detect in word vba that this is embedded document
in excel sheet?

Tnx,Milos Vukov

Office 2k -> 2k3
Make word speak to you!

Embedded Word Document Can't Tab
In my VB App I embed a Microsoft Word form template (VbOLEPrimary), and then prefill some of the bookmarks with data from an SQL database. I then protect the document with wdAllowOnlyFormFields so that the user can only enter data into the remaining form fields. My problem is that the user cannot use the Tab key or the Backspace key. The forward Delete key works. Any ideas?

Also, when double clicking on the embedded Word Document the File Menu dropdown is absent and my users need to email their document easily. Is there an easy way to display the File menu or add the Email item?

Get Attachment Embedded In Word Doc

I try to get the attachment that is embedded in the MS Word document using Visual Basic 6.0. I have searched on google but did not find any info. Please help.


- Nikki -

Embedded Word Documents
I am trying to create a application that allows me to click on a command button which lets me read an OLE object from an Access database. I then want to be able to store the document onto the form, edit the document using Word (97) and write the document back into the database as an OLE object.

In concept the above seems simple but I am having all sorts of difficulties with it.

Can anyone point me in the right direction or offer some code to help. I have read the MSDN information until it is coming out of my ears but it has not helped.

Thankyou in anticipation

MS Word Embedded Objects
I am having all sorts of trouble using embedded MS Word OLE's in a Visual Basic application.
I am a novice with VB and what I am trying to do should be as simple as pie.
I want to click a button which will allow me to read an OLE field from an Access database and store it on a form. When I am happy with all the details on the form I want to update the database with the mdified OLE document.
Below is the code I have written but I obviously have the objects messed up as it does not work.

Any assistance would be greatly appreciated.


Option Explicit
Dim WB As Object
Dim Word As Object
Dim embeddedDoc As Document
Dim appWrd As Word.Application
Dim intChunkSize As Integer

Private Sub cmdOpen_Click()
'This routine is supposed to load up the OLE object on the form with the contents of the
' "Worddocument" field in the Access database
strTestword = "Select * from Testword where Control = 'Control'"
rsTestword.Open strTestword, dcnTest, adOpenStatic, adLockOptimistic, 0
intChunkSize = Len(rsTestword("Worddocument"))
OLE1.object.object = rsTestword("Worddocument").GetChunk(intChunkSize)

End Sub

Private Sub cmdSave_Click()
'This routine is supposed to save the OLE into the database into a field
'called Worddocument which is defined in Access as an OLE.

intChunkSize = Len(OLE1.DataField)
strTestword = "Select * from Testword where Control = 'Control'"
rsTestword.Open strTestword, dcnTest, adOpenStatic, adLockOptimistic, 0
rsTestword.Fields("Worddocument").AppendChunk OLE1.object.object

End Sub

Working In MS-word Embedded In VB
Dear All

I am developing an Data entry application using vb6.0.Users use to key by looking into the images.For images to view i am providing kodak image, for keying I am serious looking for having the ms-word document embed in vb6 since the keying requires all the stuff embedded in ms-word like paragraph,heading, subheading,etc.,

Is it possible?If so how to use it.please explain.



Embedded OLE Excel Chart Object.. DYNAMIC??
Is it possible to make the OLE Excel Chart object dynamic? I chose to make a chart using this object instead of instantiating a Excel.Chart and creating one from scratch. Now I'm concerned that I can't make if I want these to be dynamic then it can't happen.
What I do is use the OLE excel chart object and then edit it by filling in the excel spreadsheet with the data and then graphing and only displaying the graph as a sheet.

Hopefully someone can help me with this. I'm sure there are VB/OLE Excel guru's out there.


&lt;How Do You?&gt; Make Binary Copy From OLE Embedded Object
I've searched the whole forum for any topics that may be related to my query but found none. So I hope I receive some good feed back from my fellow coders.

What I've attempted to do was create an exact binary copy of an OLE embedded object to a specific folder
 (i.e. [OLE-Container with embedded copy of a binary file ex:MyApp.exe] create binary duplicate to C:Temp...)

The code that I've use has no syntax errors but does not produce the desired logical output.

Code:'Home, Appfile are the variables holding the values for path and filename
Code:'fnum is the integer variable for free file number
Code:Open Home & AppFile For Binary As #fnum

Code:'Here I instruct the OLE object to save the embedded object to the free file that is opened for binary
Code:Me.oleSrv.SaveToFile (fnum)
Code:'After closing the freefile and analyzing the produced copy, the file size is about 10+KB smaller than the actual OLE embedded object
Code:Close #fnum

This function does execute. However, it does not create an exact binary copy of the object contained within the OLE control.
The problem is easily noticable since the file size is off by 10+ KB when compared To the object contained inside the OLE control. The function does create a file in the pre-determined folder but it cannot execute
because obviously there are some bytes missing.

The help that I need is how can I make the OLE control act as a true container containing a copy of a file that is not linked, then
copying the contents of the OLE to a new folder location?

If this concept can be achieved then I could create my own packager executable using OLE controls to contain 'data' files for re-distribution.

Edited by - GRAMMARSoft on 9/6/2002 5:05:02 AM

Embedded OLE Excel Chart Object.. DYNAMIC??
Is it possible to make the OLE Excel Chart object dynamic? I chose to make a chart using this object instead of instantiating a Excel.Chart and creating one from scratch. Now I'm concerned that I can't make if I want these to be dynamic then it can't happen.
What I do is use the OLE excel chart object and then edit it by filling in the excel spreadsheet with the data and then graphing and only displaying the graph as a sheet.

Hopefully someone can help me with this. I'm sure there are VB/OLE Excel guru's out there.


How To Know The File Path Of Embeded Object In A Word Document
Hello sir
I want to know that how we know the file path of the embeded object which is lie on the word document.

Interact With An Embedded Word Document With VBA
I have an Excel (2002) sheet with an embedded Word document (as an icon) that I want to interact with using VBA.
I have an User form containing a number of differnt fields represented by text- and Combo boxes linked to the Excel sheet. I also have a command button that is connected to the embedded Word document, making it possible to open it in Word.

When the user finish editing in the Word document I want to retreive some information from the document and place it in a cell in the Excel sheet and this is the point when my problem starts.

When I activate the Embedded Word document in the Command button_Click subroutine, the Word document is opened ok. But I don't know how to track when the user is ready with the document editing and has closed the document.
I can't track this in the Command button_Click subroutine after the activation because all code after the activation are run directly after the document is shown without waiting for the user to close the docuent.

I have tried to use the Word documents Document_Close() event but I never get to this subroutine when the document closes.

Any suggestions?

Creating Embedded Tables In Word With VBA?

I'm creating a Word document, from a template, to generate a series of labels. The formatting of the individual labels is somewhat complex, and seems to be handled best with a table. The label template is itself a table.

Procedurally, here's how it breaks down: I need to walk the cells of a table. Inside each cell I need to create a new table. I then need to walk the cells of that inner table, filling in data as I go, and then I need to step to the next cell in the outer table and repeat the process. I just can't figure out how to switch between the inner table and the outer table...

I'd really appreciate any insight anyone could offer. Thanks!

Macros In An Excel Doc. Embedded In A Word Doc.

I have a problem regarding macros in embedded documents.

I have an Excel worksheet that contains a macro. I also set a button to run that macro when it's cliqued.

When I insert the Excel worksheet into Word (97 by the way), with the options { link NO, icon YES }, my button doesn't work anymore...

I mean, when I open the document, I choose "Yes, activate the macros". Then Excel is run, and the workbook is named "Feuille de calcul dans C: WINNT Profiles XYZ Bureau Planning.doc" (yeah right, it's a french version ).

The button is still linked to the macro, but it won't do anything.
Still, when I open the VBA Editor, I can run the macro by clicking on the Run button.

Is there something with embedding that disables buttons ?
Weel, any idea is welcome, I'm completely stuck

Thank you


Viewing Embedded Word Documents
Ladies & Gentlemen

I am writing a project which consists of photographs of an airliner flight deck (I am a pilot by profession, very amateur VB programmer by hobby) Clicking on the various controls on the flight deck opens a new form with an OLE container that has an embedded word document in it with a description of the aircraft system. (It needs to be a word document because there is some quite complex text formatting and I need to be able to update the master document at regular intervals.)

Works fine on the PC that I am creating it on. Trouble is, when I package it up and put it on the laptop, only the very first OLE form that I click on has any text in it. When I open the next one, the OLE container is there with no text. However, if you double click on it then it opens for editing OK.

I am using the CreateEmbed method to state the Word documents to use and have tried oleUpdate, removing the embedded document and "re embedding" the next one etc etc but to no avail. Just to clarify, the user doesn't need to edit the text, just to view it in the OLE container.

Can anyone offer any assistance? Maybe I am trying to overcomplicate things here. Is there a more efficient way of showing a page of formatted text?

Any help much appreciated

Regards, Soup Dragon

Controlling An Embedded Excel In Word
For the life of me, I can't figure out how to determine the name of an Excel sheet which is embedded in my Word document. Without the name of the spreadsheet, I have no idea how to control it. This should be simple enough but I can't record a macro to provide me with some leads. I've attached the document to this message. Maybe someone can tell me how to control and insert some values in the spreadsheet from a separate VB app.

Thanks! Mike

Working With Embedded Excel In Word
Hello all.

I'm new here but hope to become an active participant.

Here is my first question:

We are working with embedded excel tables in word. (Office 2003) Specifically we have a macro which runs through and converts them over to word tables. While we are doing that, before it converts over, I would like to run a search and replace.

What is the syntax for doing this when we are working with Embedded Excel via a word macro?

Thanks all!

Can't Deactivate Ole Chart Embedded In Word

I can insert and manipulate an Excel Chart in word using the following code:

wd.Selection.InlineShapes.AddOLEObject ClassType:="Excel.Chart.8", FileName:= _
"", LinkToFile:=False, DisplayAsIcon:=False
numPlots = wd.ActiveDocument.InlineShapes.count
With wd.ActiveDocument.InlineShapes(numPlots).OLEFormat
Set objC = .object
End With

However, when I'm done doing stuff to the Excel Chart, I can't seem to write code to deactivate the ole object. It just stays activated (e.g. displayed as a workbook with a chart sheet and a worksheet). I can actually do stuff in Work programmatically while the Excel Chart is activated, but I wish to close/deactivate the chart so that the users sees only the ole chart.

Any help would be appreciated. Thanx!

Embedded Word, Menu Problem
Hello all-

I've embedded microsoft word 2000 into my VB form via the OLE Container Control.

My main form holds an activebar, menus, etc that cover the whole application. The form that I open up the OLE Container Control on is a sub form (ie it still has the activebar on the left, app-wide menus on the top).

When I embed the word application, the normal File, Edit, etc menus are shoved at the very top of the main form, instead of the subform. Why does this happen? I tried playing around with OLE Container Control in a totally separate blank project, and it appears that no matter where the OLE control is, the menus for embedded word are always at the very top of the form...

How can I move these menus to a desired location? It would be ideal of the whole embedded app was inside the OLE container, and didn't jump outside of it....

Thanks for the help!!


VB OLE With Embedded Word - Freezing The OLE Container
I have a VB application that hosts a Word document.

1) I want the OLE Container outline to never resize itself.
So, I set the SizeMode property to 3 - Zoom. Documentation states that this setting forces the embedded object to conform to the OLE Container. When the SizeMode is set to 3 the document is loaded into the OLE Container, but it does not fill the OLE Container.

Note: I set the SizeMode property to 0 - Clip. This setting works much better, however when I modify the PageMargins the OLE Container increases in size.

Any thoughts...

Excel Worksheet Embedded In Word
I use the following code to create an Excel worksheet embedded in my Word
Code:Dim shp as Shape
    Set shp = ActiveDocument.Shapes.AddOLEObject(Anchor:=Selection.Range,ClassType _
    := "Excel.Sheet.8", FileName:="", LinkToFile:=False,DisplayAsIcon:=False)

Using more code, I can manipulate the contents of this worksheet.

BUT, I cannot work out how to control the size of the worksheet so that I
can see more of it. All properties that refer to height or width simply
enlarge the visible contents so that I see the same amount of the worksheet
but it's bigger.

How can I enlarge the rectangle that contains the embedded object, keeping
the contents the same size so that more of the contents are visible?

This is easy with the mouse - simply drag the borders when the object is
active but I cannot work out how to do this programmatically.

I've tried to turn on macro recording, resize the
rectangle, then turn off recording. What I have recorded is an empty Sub!!
I have tried various ways to record the actions but with no success

Please help me!!!!!!!!!!!!!

Edited by - Adagar on 4/16/2003 12:29:18 PM

Linked &amp; Embedded Objects In Word VBA
From my udnerstanding, The M$ Word object model exposes two types objects that assist in OLE linking and embedding: inlineshape and shape.

What I'd like to do it to display either an inlineshape or a shape (determined at runtime) on a Word VBA Form in such a manner that I do not have to worry about what the Type property of the shape/inline shape is or if the object is a inlineshape vs a shape. Does anyone have any ideas?


Open/Edit Embedded Worksheet In WORD
I have been trying desperately to get a macro in word (and thus hopefully my VB app.) to simply find the embedded Excel sheet within a word document.
That was the easy part, the thing I am now believing may in fact be impossible, is getting it to then open the embedded worksheet (in MS Word) and 'Select-All' then 'Paste' it into an existing worksheet wihthin Excel.
By recording a new Macro, I try and do this (having it track the changes I make and thus writing a script for me), but ONLY when the macro is recording, the program will NOT allow me to either double-click the spreadsheet OR right click it (so I could then choose 'Edit' or 'Open').
I hope this function is not completely impossible, either through Word or VB, so If any of you experts out there know anyhting about this, your help would be GREATLY appreciated! thanks...

Script Extract Embedded Files From Word
I have some Word 2003 docs that have many embedded Outlook 2003 .msg file objects, I want all those .msg files out and in a folder on my file system, if I try and click and drag them out I get a scrap error message, either way, I would rather do so with VBA for Office but I don't know how, there are many .msg files in the word doc (approx 50), will someone please let me know if this can be done with Office VBA

Embedded Data From Database To Word Document
I want to embedded query result to existing word document, for example:

'I have a document that contain this text
hi my name is :

'then I want embedded the name to it from my db...

pls advice..

Update Shown Cells In Embedded Worksheet In Word
I have a Word document with an embedded Excel worksheet. I have certain macros in the worksheet (run by the user) that insert or delete rows. When this happens the embedded object is not automatically updated with the cells that should be shown. I know this can be done by dragging the borders of the object, but is there any way to do this programmatically? I've been at this most of the day. I can't find any propery or method of InlineShape that will do this.

The best I've come up with is to select the new correct cell range in the embedded worksheet, and paste it in Word as a new embedded worksheet, and then delete the old one. When you paste, the "selection size" is automatically correct. This isn't an ideal solution. For one thing the Excel document closes, since it's deleted, and the user has to right click|[Worksheet object]|[Open] again (on the new object).

Here's what I do now:

Dim xlwb As Excel.Workbook
Dim oCurrentList As Object

Set oCurrentList = ActiveDocument.InlineShapes(1)
Set xlwb = oCurrentList.OLEFormat.Object

Selection.PasteSpecial Placement:=wdInLine, DataType:=wdPasteOLEObject
By the way, I'd also like to know how to do this programmatically, right click|[Worksheet object]|[Open] -- so that the worksheet opens as a new window in Excel. [InlineShapes(x).OLEFormat.Open] doesn't do this. Seems [.OLEFormat.Open] and [.OLEFormat.Activate] and [.Activate] do the same thing...

Thank you for any help,

Enable/disable Embedded Buttons In A Word Document

I have some embedded buttons in a word document and I want to programatically enable/disable some of them. I can access the buttons objects with the InlineShapes property of the document, and check they really are buttons (Type = 5), but when I try to use the Enabled property VB says me that object has no "Enabled" property.

Anyone knows how to do it?

Thank you in advance!

Copy&amp;Paste From Excel To An Embedded Word Doc Page 2
Im Having 2 problems.
1) How do u open the existing document without wiping out previous changes(like the bookmarks I added). The following code seems to create a new word doc instead of using the existing document embedded.

2) How would I Paste spreadsheet range onto Page2? Bookmarks?

The following code is what I have come up with so far:

Excel.ActiveWorkbook.Worksheets(1).Shapes("OBJECT 1").Select
Selection.Verb Verb:=xlPrimary

instead of the first two lines of code

**RESOLVED**Crystal Reports / Embedded Word Document
Is there any way to place an embedded Word document within a Crystal Rpt? If so, how?

Hiding Excel When Processing Spreadsheet Embedded In Word
I’ve written a program which converts Excel spreadsheets embedded in Word into Word tables. I don’t want either Word or Excel to be visible. Hiding Word is straightforward:

Set wdApp = New Word.Application
wdApp.Visible = False

but I can’t figure out how to totally hide Excel. I’m opening the embedded object with the following code, which does hide Excel but only after it has appeared on screen for a split second:

Code:For Each myInlineShape In wdApp.ActiveDocument.InlineShapes
 If InStr(1, LCase(myInlineShape.OLEFormat.ProgId), "excel.sheet") > 0 Then
   Set myExcelSheet = myInlineShape.OLEFormat.object
   myExcelSheet.Application.Visible = False

myInlineShape.OLEFormat.DoVerb (wdOLEVerbHide) has no effect.
I thought of maybe opening Excel in the same way as Word and then somehow assigning myInlineShape.OLEFormat.object as the active workbook but I can't figure out how.

Iterating Through Word Doc W/ Tables,pics, Embedded/linked Objects
Hello All,

I was wondering if anyone could help me with a problem I'm having in VBA Word2000:

I need to iterate through a word document a process each item as it appears in the documents. As I understand it, the items I might be looking for include paragraphs, tables, pics, embedded/linked objects. Does anyone know where I could find a complete list and more importantly, how I can iterate across ALL of them as the appear in the document?

I already see that there are a bunch of collections in place inside a document. Will I have to determine the order of all theobjects in all the collections manually?

I have in front of me Wrox's Word 2k VBA book but I'm trying to get some more detailed reference information ... if you know of some pls lemme know.

Copyright 2005-08, All rights reserved