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...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Excel Worksheet Embedded In Word
I use the following code to create an Excel worksheet embedded in my Word
doc:
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
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:
Code:
Dim xlwb As Excel.Workbook
Dim oCurrentList As Object
Set oCurrentList = ActiveDocument.InlineShapes(1)
oCurrentList.Activate
Set xlwb = oCurrentList.OLEFormat.Object
xlwb.Activate
xlwb.Sheets(1).Range("Plist").Copy
Selection.PasteSpecial Placement:=wdInLine, DataType:=wdPasteOLEObject
oCurrentList.Delete
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,
nick
Open And Edit A Word Doc In VB
I know you are thinking that there are all kinds of post on this subject. Your right but I am still having problems getting them to work the way I want.
It is real simple, I want to open a word doc in vb(in the form, or frame or pic box), edit it and save the changes.
Please Help....
Thanks,
Kpoe
Open And Edit Word Document
hello guys,
I have a word document, which is basically our company letterhead. I want to use this and put some texts and later on save it to another file.
i have tried word.application and was successful in creating a new file. But what i want to do is to use the exiting file and edit it.
how can i do this?
thanks in advance!
Open, Edit And Save Word Document From VB5
Hi all!
Im trying to create a program in Visual Basic 5.0 (not VBA), and i want to open Word and use the VBA commands to edit, save etc., like in word macros but from my VB program. How is this possible? Does anyone have code examples?
Thomas
Open, Edit, Save Word Document On Remote Server
Does anyone have an idea how I can write a web app that can launch a word document, allow the user to edit the file on the remote server and save the file without having to download the file to the client machine? I am developing software for an industry where secure documents are a must. Currently files are downloaded to the users machine altered, then uploaded to the server. The ideal situation would be to access and edit the file directly on the server so that the file would never end up on the user's PC and keeping the contents more secure. Any thoughts?
Thanks
ListBox Embedded In Worksheet
Hi,
I'm trying to populate a listbox with words which are contained in a named range, but the idea is that the listbox contents change depending on which named range is typed into cell A1. The listbox is not on a form it is simply embedded in the worksheet.
The idea is that users type a word into cell A1 and the listbox is positioned in cell B1 down to about B10. Whatever word they type in cell A1 they are presented with a list of alternative words in the listbox (kind of like a thesaurus or dictionary idea except very limited in what they are likely to search for).
I have lots of named ranges which contain the alternative words so for example cell AB1 contains the word 'migraine' which is the name of the range then the cells below it contain alternative words e.g 'headache'.
So if a user types 'migraine' into cell A1 I want the list box to display 'headache' which is contained in the named range.
How do I tell the listbox to consider the term typed into cell A1 as a named range and thus display the contents of the range in the listbox?
I imagine I would need to have a formula in the input range of the list box but this doesn't seem possible.
I'm not even sure if my listbox is called 'ListBox1' because it is just embedded in the worksheet and not on a form.
Any help is very much appreciated!
Resizing Embedded Worksheet
We're having a serious issue that is threatening our rollout date. We have an Excel worksheet embedded in a PowerPoint slide and need to resize it programatically....not the PP Shape, but the actual Worksheet.
Try this, run Excel and select a range of cells. Now run PowerPoint beside Excel and bring up a slide. Grab the outline of the selected cells and drag them onto the slide. You now have an Excel worksheet embedded in your PP slide. Let's say you can see 4 columns. If you click on the slide (not on the worksheet) the worksheet just displays as a grid. If you single-click the grid and grab a resize handle and resize the thing, the columns grow proportionally and you still see only 4. If you double-click the worksheet (thus activating Excel) and grab a resize handle and resize the thing, you see more (or less) columns and they don't zoom. We need to replicate the latter behavior in code but all we've been able to accomplish is the former, the proportional growth thing.
In our app, we have references to the slide, the shape and the excel worksheet. We can programmatically activate the worksheet, but all efforts to resize it just resize the slide and expand the columns.
HELP!! Please! Anyone!!! HELP!!!
Printing Embedded Ole Worksheet
I got an embedded ole worksheet in an access database and am looking for a way of printing it without opening the form.
So far I can get it to print as follows but there must be a better way
Private Sub Image_DblClick(Cancel As Integer)
Dim appexcel As Excel.Application
Dim wbExcel As Excel.Workbook
Dim shexcel As Excel.Worksheet
Set appexcel = New Excel.Application
Set wbExcel = appexcel.Workbooks.Add
Me.Image.SetFocus
DoCmd.RunCommand acCmdCopy
appexcel.Visible = True
appexcel.Range("A1").Select
appexcel.ActiveSheet.Paste
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
appexcel.ActiveWorkbook.Close
End Sub
Many thanks
John
Worksheet Embedded Objects Don't Work
All of a sudden one day Command Buttons embedded on a worksheet quit functioning. I also noticed that if I try to insert any embedded object be it command button, text box or whatever in a current workbook or brand new workbook I get the error Cannot Insert Object. I've searched Help, looked at all the various menu protection items, searched various Excel forums and I can't find an answer. Any assistance will be greatly appreciated as this is driving me nuts.
Massive Slowdown With Embedded Worksheet In Powerpoint
Here's what i'm trying to do:
In excel I created a worksheet, a chart, and wrote VBA to carry out a simulation. The results of the simulation changes values on the worksheet and the chart updates. I am now trying to add this project into PPT to demonstrate the simulation.
In doing so, I have tried to embed the workbook into powerpoint and I have tried to link the workbook into powerpoint.
Long story short is that I have some new code written that carries out the simulation and it runs quite fast. As soon as I UPDATE the slide which shows my chart from the embeded workbook, my simulation now runs painfully slow.
If I close the slideshow and reopen it, the first time I run the simulation it goes fast, all other times it goes really slow. The slowdown seems to be when reading and writing to the worksheet. However, the use of "excel.application.screenupdating = false" makes no difference.
Does anyone have any idea what is going on or how to keep my simulation running fast?
Populating An Excel Worksheet Embedded In An Access Report With Data
IS IT POSSIBLE TO MANIPULATE DATA INSIDE AN EXCEL WORKSHEET THAT IS EMBEDDED IN AN ACCESS REPORT??? I'm beginning to think not. I've been trying for 2 days with no success.
I inserted worksheets in various ways, but let's say I insert a worksheet by doing the following:
In report design mode --> Insert --> Object... --> Create New --> Microsoft Excel Worksheet.
Now, I have a query. I want to populate the embedded, or linked, excel worksheet with the results of my query.
Access cannot create diagonal column headers which my client REQUIRES, and the "Rotate Text" ActiveX control is not clean enough. So, I am using an Excel worksheet for the formatting only. I would import data into the Excel Worksheet from Excel rather than Access, but unfortunately, since my query is a complex crosstab query with a parameter, I get errors when I try to write the SQL statement in Excel. Therefore, I need to embed the worksheet in my Access Report and populate it with data programatically. So far, all my attempts have failed.
At this point I've removed all the unnecessary complexity and all I have is this:
1 Table with two columns (id, name)
1 Query getting names from the table
1 Report with an embedded Microsoft Excel Worksheet
Can somebody please tell me how to get the names into the worksheet in the report?
Populating An Excel Worksheet Embedded In An Access Report With Data
IS IT POSSIBLE TO MANIPULATE DATA INSIDE AN EXCEL WORKSHEET THAT IS EMBEDDED IN AN ACCESS REPORT??? I'm beginning to think not. I've been trying for 2 days with no success.
I inserted worksheets in various ways, but let's say I insert a worksheet by doing the following:
In report design mode --> Insert --> Object... --> Create New --> Microsoft Excel Worksheet.
Now, I have a query. I want to populate the embedded, or linked, excel worksheet with the results of my query.
Access cannot create diagonal column headers which my client REQUIRES, and the "Rotate Text" ActiveX control is not clean enough. So, I am using an Excel worksheet for the formatting only. I would import data into the Excel Worksheet from Excel rather than Access, but unfortunately, since my query is a complex crosstab query with a parameter, I get errors when I try to write the SQL statement in Excel. Therefore, I need to embed the worksheet in my Access Report and populate it with data programatically. So far, all my attempts have failed.
At this point I've removed all the unnecessary complexity and all I have is this:
1 Table with two columns (id, name)
1 Query getting names from the table
1 Report with an embedded Microsoft Excel Worksheet
Can somebody please tell me how to get the names into the worksheet in the report?
Edit An Excel Worksheet Using VB
I have a small procedure that I'm running in a module that is supposed to open an Excel file, modify a single cell, then shut down. I'm getting a runtime error - 1004 application defined or object defined error. This is in VB 6.0 Here is my script :
Private Sub CompuType()
ConvertedFileName = "C:CSPPROGRAMSTests.xls"
Set objExcel = GetObject(ConvertedFileName)
objExcel.application.Visible = False
objExcel.application.cells(1, 1) = "Dummy"
objExcel.application.quit
End Sub
Any suggestions? I have looked EVERYWHERE I can think of, but I still gett this error. It is assigned to the cells(1,1)="Dummy" line. Your assistance is appreciated.
Respectfully,
Delljohnb
Embedded Chart In A Worksheet And A Chart Exisiting On Its Own Sheet
what is the difference between a Chart embedded in a worksheet and a chart existing on their own sheets. i mean what is the difference between being embedded in a worksheet and existing on their own sheets.
i came across the statement on the MSDN site
Note Charts embedded in a worksheet are members of the ChartObjects collection, whereas charts that exist on their own sheets belong to the Charts collection.
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 ?
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
Vb6,sp6
-------------------------------------------
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
Hi,
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.
Thanks,
- 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)
rsTestword.Close
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
rsTestword.Update
rsTestword.Close
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.
Regards
Sasikumar
=
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?
Hi,
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.
Hi,
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
~bigquick~
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
All,
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
'.Activate
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!!
Aaron.
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...
Linked & 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?
V/R,
Chris
Embedded Visual Basic File Open Problem
In evb 2002 for Windows CE
Code:
Dim File As String
MkDir ("Argonaut Data")
File = "Argonaut DataData.txt"
Open File For Append As #1
Print #1, strTemp
Close #1
When make file, VB will give out error saying "Compile Error: Expected End of Statement" for the Open command line
Now what is that suppose to mean?
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 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.
Thanks!
IANIAN
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..
thanks
Accessing Embedded Text File In MS Word
Hi,
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?
Regards,
Asif
Open A Worksheet
In Excel, how can I make a CommandButton1 on a userform open Sheet1?
Cheers
rimpet
Open Particular Worksheet ??
Hi guys.
I have one Excel file and few WorkSheet in that Named differently.
Can anyone plz. help me how do I open Excel File and that particular worksheet by name and get data from that.
Thanks in advance.
Open And Edit An Open Process
Hey,
I have been searching throughout the internet for the answer to this question, and I have yet to find a decent answer.
I want to be able to make a program that will, at the click of a button, open a particular process and edit the contents. Such as changing the value of offset, 6E93A8 (which is 0C) to 0E. So far I can only edit an exe that isn't running
Thank you, in advance
Enable/disable Embedded Buttons In A Word Document
Hi!
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&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
Excel.Range("Range").Copy
Word.Documents(1).Select
Word.ActiveDocument.Bookmarks(1).Select
Word.Selection.PasteSpecial
Excel.ActiveWorkbook.Worksheets(1).Shapes(1).OLEFormat.Activate
instead of the first two lines of code
|