In my Word document there are many embedded Excel spreadsheets. Usually these Excel embeddings are bigger than the small portion shown in Word. I don't want to mess with the whole sheet when I enter the embedded file, I need to edit only this small area which is seen in Word. I know that it is only a picture, but when you <code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">ActiveDocument.InlineShapes(1).OLEFormat.Edit</code>, exactly the same small area opens in edit mode. I need to get the range of this area in order to be able to work only with this portion of the worksheet. I currently use these variables:
Code:
<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">[COLOR=#00008B]Dim[/COLOR] wrdActDoc [COLOR=#00008B]As[/COLOR] Document
[COLOR=#00008B] Set[/COLOR] wrdActDoc = ActiveDocument
[COLOR=#00008B]Dim[/COLOR] oOleFormat [COLOR=#00008B]As[/COLOR] OLEFormat
[COLOR=#00008B]Dim[/COLOR] oWS [COLOR=#00008B]As[/COLOR] Excel.Worksheet
[COLOR=#00008B] Set[/COLOR] oOleFormat = wrdActDoc.InlineShapes([COLOR=#800000]1[/COLOR]).OLEFormat
[COLOR=#00008B] Set[/COLOR] oWS = oOleFormat.[COLOR=#00008B]Object[/COLOR].ActiveSheet</code>