Compatibility Issue with diff Power Point

G

Gary

I am using VBA code in an Access 2000 application.

I have an OLE object embeded in a table in access. I active it by using the
action command:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This opens up the embeded OLE object in its own window. After setting some
settings of the OLE object, I closed the OLE object down with:

AppVisio.Quit
Set AppVisio = Nothing

Everything works here!!!

The problem is when I do the add side command in power point,

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"


another OLEObject forms opens up. In my case, it is Visio.

I think there is a compatibility issue between the computer that got those
extra Visio windows vs the computer at work, and a friend's computer???

My Home has a xp sp2+ with os with office, access, and ppt 2000 sp3.
My work has an win 2000 pro os with office, access, and ppt with 2002 sp3
My friend has a xp sp2+ win os with office, access, and ppt with 2003

All three system uses the same version of Visio.

Can someone please help!

Gary
 
G

Gary

Let me try again:


I am running the whole program in Access 2000 using VBA code

There are some tables I have in Access 2000 which has embedded OLE Object
fields. The application of the embedded OLE object is a Visio application.
I used Access 2000 VBA code to activate the embedded Visio Object from the
table.
The command used was:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This causes the embed OLE in the Access tale to open up
Once open, I mixed up the

Inwith the Access VBA code, I am also using power point to paste the Visio
Object on the a slide. I am using this command from VBA to do that:

oPres.Slides.Add(oPres.Slides.Count + 1, _
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth, _
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

I close the visio window open by the Table while still in access. Then
when access VBA code execute the the above command

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

Another Visio windows opens up.

This only happends on the home system.


Hope someone can help!!!

Gary

Steve Rindsberg said:
Can you back up and lay this out again? I think you've left out some steps ...
we're cooking along in Access doing stuff with a Visio OLE object and then
suddenly we're in PowerPoint. Or automating PowerPoint from Access. Or
something.



I am using VBA code in an Access 2000 application.

I have an OLE object embeded in a table in access. I active it by using the
action command:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This opens up the embeded OLE object in its own window. After setting some
settings of the OLE object, I closed the OLE object down with:

AppVisio.Quit
Set AppVisio = Nothing

Everything works here!!!

The problem is when I do the add side command in power point,

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

another OLEObject forms opens up. In my case, it is Visio.

I think there is a compatibility issue between the computer that got those
extra Visio windows vs the computer at work, and a friend's computer???

My Home has a xp sp2+ with os with office, access, and ppt 2000 sp3.
My work has an win 2000 pro os with office, access, and ppt with 2002 sp3
My friend has a xp sp2+ win os with office, access, and ppt with 2003

All three system uses the same version of Visio.

Can someone please help!

Gary

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
G

Gary

I sure what you mean by object variables for both PPT and Visio application.
If you are referring to the object variable that was pasted into access
table, I assume its the same object variable when I open it up from the
Access Table using the command
Forms![GenPPT]![OLEFile].Action = acOLEActivate.

The Object name from the Acess table is called [OLEFile]

Once its open, I same the complete object into a tempory file and read it
immediately back out during the power point add command.

oPres.Slides.Add(oPres.Slides.Count + 1, ppLayoutBlank).Shapes.AddOLEObject
_ Left:=0,Top:=0, Width:=xWidth, Height:=yHeight,
FileName:=Trim(Working_Directory) & "\tempory.vsd"

The problem only occurs on my system which is using power point 2000. The
others are using power point 2002 and 2003.


Thanks,

Gary


Steve Rindsberg said:
Let me try again:

Thanks. I can't see anything offhand that'd provoke this behavior; is there any
chance you're using the same object variables for both the PPT and Visio application
or document objects?
I am running the whole program in Access 2000 using VBA code

There are some tables I have in Access 2000 which has embedded OLE Object
fields. The application of the embedded OLE object is a Visio application.
I used Access 2000 VBA code to activate the embedded Visio Object from the
table.
The command used was:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This causes the embed OLE in the Access tale to open up
Once open, I mixed up the

Inwith the Access VBA code, I am also using power point to paste the Visio
Object on the a slide. I am using this command from VBA to do that:

oPres.Slides.Add(oPres.Slides.Count + 1, _
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth, _
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"
I close the visio window open by the Table while still in access. Then
when access VBA code execute the the above command

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

Another Visio windows opens up.

This only happends on the home system.

Hope someone can help!!!

Gary

Steve Rindsberg said:
Can you back up and lay this out again? I think you've left out some steps ...
we're cooking along in Access doing stuff with a Visio OLE object and then
suddenly we're in PowerPoint. Or automating PowerPoint from Access. Or
something.



I am using VBA code in an Access 2000 application.

I have an OLE object embeded in a table in access. I active it by using the
action command:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This opens up the embeded OLE object in its own window. After setting some
settings of the OLE object, I closed the OLE object down with:

AppVisio.Quit
Set AppVisio = Nothing

Everything works here!!!

The problem is when I do the add side command in power point,

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

another OLEObject forms opens up. In my case, it is Visio.

I think there is a compatibility issue between the computer that got those
extra Visio windows vs the computer at work, and a friend's computer???

My Home has a xp sp2+ with os with office, access, and ppt 2000 sp3.
My work has an win 2000 pro os with office, access, and ppt with 2002 sp3
My friend has a xp sp2+ win os with office, access, and ppt with 2003

All three system uses the same version of Visio.

Can someone please help!

Gary


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 
G

Gary

Your're right - I was not sure.

oPres is the object in Power point and I think DocObj is the object in
Visio??

This is how I declared by variables:


Static oPPT As PowerPoint.Application
Static oPres As Presentation
Static VisioLayerCntr As Variant

Static AppVisio As Visio.Application
Static DocObj As Visio.Document

Static db As Database
Static T As DAO.Recordset
Static Ts As DAO.Recordset

Set oPPT = New PowerPoint.Application
Set oPres = oPPT.Presentations.Add(True)

oPres.PageSetup.SlideWidth = xWidth
oPres.PageSetup.SlideHeight = yHeight


Set AppVisio = GetObject(, "visio.Application")
Set DocObj = AppVisio.ActiveDocument

AppVisio.ActiveWindow.SelectAll
AppVisio.ActiveWindow.Selection.Flip visFlipHorizontal,
visFlipSelectionWithPin, , 3.824219, 2.25, visInches
AppVisio.ActiveWindow.Selection.Flip visFlipVertical,
visFlipSelectionWithPin, , 3.824219, 2.25, visInches

DocObj.SaveAs Trim(Working_Directory) & "\tempory.vsd"

oPres.PageSetup.SlideHeight = (8.5 * 1440) / 20
AppVisio.Quit
Set AppVisio = Nothing

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"


Can you tell what may be causing my problem???


Gary


Steve Rindsberg said:
I sure what you mean by object variables for both PPT and Visio application.

Do you mean that you're not sure?
If you are referring to the object variable that was pasted into access
table, I assume its the same object variable when I open it up from the
Access Table using the command
Forms![GenPPT]![OLEFile].Action = acOLEActivate.

No, that'd be the object itself.
The Object name from the Acess table is called [OLEFile]

Once its open, I same the complete object into a tempory file and read it
immediately back out during the power point add command.

oPres would be your object variable here. How have you declared it and activated
PowerPoint?
oPres.Slides.Add(oPres.Slides.Count + 1, ppLayoutBlank).Shapes.AddOLEObject
_ Left:=0,Top:=0, Width:=xWidth, Height:=yHeight,
FileName:=Trim(Working_Directory) & "\tempory.vsd"

The problem only occurs on my system which is using power point 2000. The
others are using power point 2002 and 2003.

Thanks,

Gary

Steve Rindsberg said:
Let me try again:

Thanks. I can't see anything offhand that'd provoke this behavior; is there any
chance you're using the same object variables for both the PPT and Visio application
or document objects?


I am running the whole program in Access 2000 using VBA code

There are some tables I have in Access 2000 which has embedded OLE Object
fields. The application of the embedded OLE object is a Visio application.
I used Access 2000 VBA code to activate the embedded Visio Object from the
table.
The command used was:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This causes the embed OLE in the Access tale to open up
Once open, I mixed up the

Inwith the Access VBA code, I am also using power point to paste the Visio
Object on the a slide. I am using this command from VBA to do that:

oPres.Slides.Add(oPres.Slides.Count + 1, _
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth, _
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"


I close the visio window open by the Table while still in access. Then
when access VBA code execute the the above command

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

Another Visio windows opens up.

This only happends on the home system.

Hope someone can help!!!

Gary

:


Can you back up and lay this out again? I think you've left out some steps ...
we're cooking along in Access doing stuff with a Visio OLE object and then
suddenly we're in PowerPoint. Or automating PowerPoint from Access. Or
something.



I am using VBA code in an Access 2000 application.

I have an OLE object embeded in a table in access. I active it by using the
action command:

Forms![GenPPT]![OLEFile].Action = acOLEActivate

This opens up the embeded OLE object in its own window. After setting some
settings of the OLE object, I closed the OLE object down with:

AppVisio.Quit
Set AppVisio = Nothing

Everything works here!!!

The problem is when I do the add side command in power point,

oPres.Slides.Add(oPres.Slides.Count + 1,
ppLayoutBlank).Shapes.AddOLEObject Left:=0, Top:=0, Width:=xWidth,
Height:=yHeight, FileName:=Trim(Working_Directory) & "\tempory.vsd"

another OLEObject forms opens up. In my case, it is Visio.

I think there is a compatibility issue between the computer that got those
extra Visio windows vs the computer at work, and a friend's computer???

My Home has a xp sp2+ with os with office, access, and ppt 2000 sp3.
My work has an win 2000 pro os with office, access, and ppt with 2002 sp3
My friend has a xp sp2+ win os with office, access, and ppt with 2003

All three system uses the same version of Visio.

Can someone please help!

Gary


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================





-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top