Change the souce of a Linked object in word.
Object from an excel is to be linked to word.
Thus if a change is made to source file it gets updated automatically while opening word.(Provided the option to update
Is automatioc and not manual)
we link excel following the steps:
1.Click on Insert-->Object menu option
2.Object Dialog opens
3.Select create from File Tab
4.Specify the file name
5.Select the Link to File checkbox
The item in file option is blank and is verified by.
1.Select the object linked in word
2.Right click and select the Linked WorksheetObject--->Links
3.Item In File is blank.
The Item in File could be modified as follows:
1.Click the Change Source Button
2.Select the source Excel File
3.Click the Item button in the Change Source Dialog box
4.Specify the range like:R4C1:R17C9
6.The source gets modified.
The code snippet is as follows:
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
'The object gets linked to word.
set Ils= objSelection.InlineShapes.AddOLEObject( "Excel.Sheet.8", "C:\bic1.xls", true, False)
objWord.quit'prevent the doc to get locked !
The script links the Excel file to the word document.
How could the source of the linked object be changed like i want to change the souce and want the item in the range R4C1:R17C9 of the same excel file to be linked.
Any Input is appreciated..