M
Mr. Smith
Hi All,
I'm quite familar with working with data from various databases in Office
apps but never Powerpoint. I tried the following code to test the workings
of using SQL data in a PP pres but it fails. Can anyone tell me why? Am I
missing a reference? I don't think I am but maybe on of you MS gurus can help
me.
(Taken directly from Office help)
********************************
Sub SetAndReturnDataSourceName()
Dim appOffice As Office.OfficeDataSourceObject
Set appOffice = Application.OfficeDataSourceObject
With appOffice
.Open bstrConnect:="DRIVER=SQL Server;SERVER=10.15.1.66\Refresh;" & _
"AdlerM=user;PWD=Eagle1234;DATABASE=Refresh",
bstrTable:="Employees"
If .DataSource = "" Then
.DataSource = "Refresh"
MsgBox .DataSource
End If
End With
End Sub
*********************************
Specifically it fails on:
"Set appOffice = Application.OfficeDataSourceObject"
reporting that "Method or data member not found." for
"OfficeDataSourceObject" so how can I make OfficeDataSourceObject a member of
the Powerpoint Application object? A decent google search has offered me
nothig that I have been able to make sense of.
Cheers,
Mr. Smith
I'm quite familar with working with data from various databases in Office
apps but never Powerpoint. I tried the following code to test the workings
of using SQL data in a PP pres but it fails. Can anyone tell me why? Am I
missing a reference? I don't think I am but maybe on of you MS gurus can help
me.
(Taken directly from Office help)
********************************
Sub SetAndReturnDataSourceName()
Dim appOffice As Office.OfficeDataSourceObject
Set appOffice = Application.OfficeDataSourceObject
With appOffice
.Open bstrConnect:="DRIVER=SQL Server;SERVER=10.15.1.66\Refresh;" & _
"AdlerM=user;PWD=Eagle1234;DATABASE=Refresh",
bstrTable:="Employees"
If .DataSource = "" Then
.DataSource = "Refresh"
MsgBox .DataSource
End If
End With
End Sub
*********************************
Specifically it fails on:
"Set appOffice = Application.OfficeDataSourceObject"
reporting that "Method or data member not found." for
"OfficeDataSourceObject" so how can I make OfficeDataSourceObject a member of
the Powerpoint Application object? A decent google search has offered me
nothig that I have been able to make sense of.
Cheers,
Mr. Smith