Holger Gerths
2004-07-14 09:32:11 UTC
Hello NG,
I try the following VBA Code to update a linked Excel(2003) Cell Range in
PowerPoint(2003):
Sub Relink()
' Assume that the Excel Workbook is in the same directory as the ppt
ActivePresentation.Slides(1).Shapes(1).LinkFormat.SourceFullName =
ActivePresentation.Path & "MyExcelWorkbook.xls!MySheet!R2C2:R13C6"
ActivePresentation.Slides(1).Shapes(1).LinkFormat.Update
End Sub
The reason to do this is to relink the linked Excel Range when the Excel
Workbook has been moved or renamed and
PowerPoint unfortunately stores OLE links (like any other Office App) with
absolute paths.
Even though I specify the Cell Range (...MySheet!R2C2:R13C6) in the same way
as it was in the LinkFormat.SourceFullName - property,
the link is now, after relinking, the whole Excel Sheet, not the cell range.
Any idea? Thanks in advance.
With best regards,
Holger.
I try the following VBA Code to update a linked Excel(2003) Cell Range in
PowerPoint(2003):
Sub Relink()
' Assume that the Excel Workbook is in the same directory as the ppt
ActivePresentation.Slides(1).Shapes(1).LinkFormat.SourceFullName =
ActivePresentation.Path & "MyExcelWorkbook.xls!MySheet!R2C2:R13C6"
ActivePresentation.Slides(1).Shapes(1).LinkFormat.Update
End Sub
The reason to do this is to relink the linked Excel Range when the Excel
Workbook has been moved or renamed and
PowerPoint unfortunately stores OLE links (like any other Office App) with
absolute paths.
Even though I specify the Cell Range (...MySheet!R2C2:R13C6) in the same way
as it was in the LinkFormat.SourceFullName - property,
the link is now, after relinking, the whole Excel Sheet, not the cell range.
Any idea? Thanks in advance.
With best regards,
Holger.