Paste Linking Ranges From Excel 
Author Message
 Paste Linking Ranges From Excel

Hi -
Here's what I am trying to do.  I have copied cells A1:F7
from Excel and then paste linked them into PowerPoint.  If
I then insert two rows above row one in Excel, I can still
see what is in cells A1:F7 in my PowerPoint file even
though the Excel data that I now want to see is in cells
A1:F9 (the original 7 rows plus the two newly inserted
rows).
I was trying to figure out if there was a way to paste
link a named range from Excel to PowerPoint so that I am
seeing all of the data.
Does anyone have any ideas?
Thanks,
Kristin


Wed, 11 Feb 2004 01:51:37 GMT  
 Paste Linking Ranges From Excel
[This followup was posted to microsoft.public.powerpoint with an email
copy to Kristin.
Please use the newsgroup for further discussion.]

The only way I could figure out to use a named XL range with a linked
object in PP was somewhat complicated.  It requires (a) a sheet level
name in XL, (b) using PP VBE to identify the linked object in PP and
change its FullSourceName attribute.

It is possible -- though I don't know for sure -- that PPTools (a free
add-in from www.rdpslides.com) will give you direct access to the
FullSourceName property of the inserted object without resorting to the
PP Visual Basic Editor.

The hard way...

Create a named range in XL.  This has to be a sheet level name, say,
Sheet1!aRng     =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A),1)

Save the file.  Call it linktest.xls.

Now, select the range and paste link into PP.  Assume this is on the
first slide and that this is the third shape on the slide (the first two
being two placeholders).

Next, go to PP VBE.

In the immediate window (View | Immediate Window), enter
?activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName
You should see something like E:\TEMP\PPT\LINKTEST.XLS!Sheet1!R2C1:R11C1
[This verifies that we have identified the correct shape]

In the immediate window, enter
activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName="E:
\TEMP\PPT\LINKTEST.XLS!Sheet1!arng"
[The above 2 lines should be on a single line.  The text wraps in the NG
post]

Verify that the name is changed by reentering
?activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName
This time you should see E:\TEMP\PPT\LINKTEST.XLS!Sheet1!arng

While the above was tested with XL2002 and PP2002, I remember doing this
with Office 2000.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
--



Quote:
> Hi -
> Here's what I am trying to do.  I have copied cells A1:F7
> from Excel and then paste linked them into PowerPoint.  If
> I then insert two rows above row one in Excel, I can still
> see what is in cells A1:F7 in my PowerPoint file even
> though the Excel data that I now want to see is in cells
> A1:F9 (the original 7 rows plus the two newly inserted
> rows).
> I was trying to figure out if there was a way to paste
> link a named range from Excel to PowerPoint so that I am
> seeing all of the data.
> Does anyone have any ideas?
> Thanks,
> Kristin



Sat, 14 Feb 2004 06:07:06 GMT  
 Paste Linking Ranges From Excel
The Piggie in PPTools won't let you edit link ranges, but this should do it:
(adding it to the FAQ as well)

Sub EditLinkString()

Dim strTemp As String
Dim strInput As String

With ActiveWindow.Selection.ShapeRange
    If .Type = msoLinkedOLEObject Then
        strTemp = .LinkFormat.SourceFullName
        strInput = InputBox("It's all yours, Chief.  Edit away.", "Edit
source", strTemp)
        If strInput <> "" Then   ' don't let them blank it out
            If strInput <> strTemp Then  ' don't change it if nothing
changed
                .LinkFormat.SourceFullName = strInput
                .LinkFormat.Update
            End If
        End If
    Else
        MsgBox "YO!  This isn't a linked object."
    End If

End With

End Sub

--
Steve Rindsberg, PowerPoint MVP
Got a PowerPoint wish/suggestion/beef?

Get the PPT FAQs at http://www.rdpslides.com/pptfaq/
RnR PPTools - http://www.rdpslides.com/pptools/
------

Quote:
> [This followup was posted to microsoft.public.powerpoint with an email
> copy to Kristin.
> Please use the newsgroup for further discussion.]

> The only way I could figure out to use a named XL range with a linked
> object in PP was somewhat complicated.  It requires (a) a sheet level
> name in XL, (b) using PP VBE to identify the linked object in PP and
> change its FullSourceName attribute.

> It is possible -- though I don't know for sure -- that PPTools (a free
> add-in from www.rdpslides.com) will give you direct access to the
> FullSourceName property of the inserted object without resorting to the
> PP Visual Basic Editor.

> The hard way...

> Create a named range in XL.  This has to be a sheet level name, say,
> Sheet1!aRng =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A),1)

> Save the file.  Call it linktest.xls.

> Now, select the range and paste link into PP.  Assume this is on the
> first slide and that this is the third shape on the slide (the first two
> being two placeholders).

> Next, go to PP VBE.

> In the immediate window (View | Immediate Window), enter
> ?activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName
> You should see something like E:\TEMP\PPT\LINKTEST.XLS!Sheet1!R2C1:R11C1
> [This verifies that we have identified the correct shape]

> In the immediate window, enter
> activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName="E:
> \TEMP\PPT\LINKTEST.XLS!Sheet1!arng"
> [The above 2 lines should be on a single line.  The text wraps in the NG
> post]

> Verify that the name is changed by reentering
> ?activepresentation.Slides(1).Shapes(3).linkformat.SourceFullName
> This time you should see E:\TEMP\PPT\LINKTEST.XLS!Sheet1!arng

> While the above was tested with XL2002 and PP2002, I remember doing this
> with Office 2000.

> --
> Regards,

> Tushar Mehta
> www.tushar-mehta.com
> --



> > Hi -
> > Here's what I am trying to do.  I have copied cells A1:F7
> > from Excel and then paste linked them into PowerPoint.  If
> > I then insert two rows above row one in Excel, I can still
> > see what is in cells A1:F7 in my PowerPoint file even
> > though the Excel data that I now want to see is in cells
> > A1:F9 (the original 7 rows plus the two newly inserted
> > rows).
> > I was trying to figure out if there was a way to paste
> > link a named range from Excel to PowerPoint so that I am
> > seeing all of the data.
> > Does anyone have any ideas?
> > Thanks,
> > Kristin



Sat, 14 Feb 2004 21:25:58 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Using VBA to paste linked Excel range into Powerpoint

2. Pasting Excel Link works, Pasting Excel Object doesn't

3. Update Excel Chart on Access Form Created from Paste Special (Paste as a Link)

4. Update Excel Chart on Access Form Created from Paste Special (Paste as a Link)

5. Office 97 Excel to Powerpoint paste vs paste link

6. Please help! Copy and paste LINK multiple ranges

7. Copy multiple range for paste link on another sheet

8. Please help! Copy and paste LINK multiple ranges

9. Copy multiple range for paste link on another sheet (From Jacob Parker)

10. Paste linking excel into either word or excel...


 
Powered by phpBB® Forum Software © phpBB Group