A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

VBA macros Powerpoint compatibility problem



 
 
Thread Tools Display Modes
  #1  
Old April 23rd, 2010, 02:13 PM posted to microsoft.public.powerpoint
jean-luc bonnier
external usenet poster
 
Posts: 3
Default VBA macros Powerpoint compatibility problem

We experience problems with Visual Basic macros under Powerpoint

These macros have been developed with Powerpoint 2003 and VBA 6.1. When
executed with this environment, no problem.

Problem is when we execute them on Powerpoint 2007 and VBA 6.1 or 6.3.
Any idea for fixing this comptability problem ?

Extract of VBA code and error code:
ActiveWindow.Close
ActiveWindow.View.Paste
VBA error 80048240 on View.Paste
View (unknown member) : Invalid request. Clipboard is empty or contains data
which may not be pasted here

I've tried to apply what is recommended in
http://support.microsoft.com/default.aspx/kb/285472?p=1
but without success.

I am quite a beginner in VBA and really don't know to debug that.
Let me know if you want to see these macros and I'll send you.

Thanks for your support
Jean-Luc (in HP Grenoble France)

  #2  
Old April 23rd, 2010, 03:28 PM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default VBA macros Powerpoint compatibility problem

Hi,
Have you confirmed what is the active window when you try to paste? Are you
trying to paste on the slide? If you know the location of the paste location
have you tried alternate approached like using
ActivePresentation.Slides(1).Shapes.Paste?


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.

"jean-luc bonnier" wrote in
message ...
We experience problems with Visual Basic macros under Powerpoint

These macros have been developed with Powerpoint 2003 and VBA 6.1. When
executed with this environment, no problem.

Problem is when we execute them on Powerpoint 2007 and VBA 6.1 or 6.3.
Any idea for fixing this comptability problem ?

Extract of VBA code and error code:
ActiveWindow.Close
ActiveWindow.View.Paste
VBA error 80048240 on View.Paste
View (unknown member) : Invalid request. Clipboard is empty or contains
data
which may not be pasted here

I've tried to apply what is recommended in
http://support.microsoft.com/default.aspx/kb/285472?p=1
but without success.

I am quite a beginner in VBA and really don't know to debug that.
Let me know if you want to see these macros and I'll send you.

Thanks for your support
Jean-Luc (in HP Grenoble France)

  #3  
Old April 23rd, 2010, 04:01 PM posted to microsoft.public.powerpoint
jean-luc bonnier
external usenet poster
 
Posts: 3
Default VBA macros Powerpoint compatibility problem

Thanks for your reply.
The sequence is the following:

ActivePresentation.Slides.Range.Copy
ActiveWindow.Close
ActiveWindow.View.Paste

Paste works on PP2003 and not on PP2007

But this VBA code seem quite obscure to me
Let me know if I can send you the whole code.

Best regards
JLuc Bonnier


"Shyam Pillai" wrote:

Hi,
Have you confirmed what is the active window when you try to paste? Are you
trying to paste on the slide? If you know the location of the paste location
have you tried alternate approached like using
ActivePresentation.Slides(1).Shapes.Paste?


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.

"jean-luc bonnier" wrote in
message ...
We experience problems with Visual Basic macros under Powerpoint

These macros have been developed with Powerpoint 2003 and VBA 6.1. When
executed with this environment, no problem.

Problem is when we execute them on Powerpoint 2007 and VBA 6.1 or 6.3.
Any idea for fixing this comptability problem ?

Extract of VBA code and error code:
ActiveWindow.Close
ActiveWindow.View.Paste
VBA error 80048240 on View.Paste
View (unknown member) : Invalid request. Clipboard is empty or contains
data
which may not be pasted here

I've tried to apply what is recommended in
http://support.microsoft.com/default.aspx/kb/285472?p=1
but without success.

I am quite a beginner in VBA and really don't know to debug that.
Let me know if you want to see these macros and I'll send you.

Thanks for your support
Jean-Luc (in HP Grenoble France)

  #4  
Old April 23rd, 2010, 04:49 PM posted to microsoft.public.powerpoint
Shyam Pillai
external usenet poster
 
Posts: 622
Default VBA macros Powerpoint compatibility problem

Hi,
I can repro the problem with your code. The code basically assumes that the
view in which the presentation is in will accept the pasted slides. While
this may have worked in PPT 2003, you need to ensure that the current view
can accept the pasted contents. For example you cannot assume that the
activewindow will accept the contents of the Paste operation.

ActivePresentation.Slides.Range.Copy
ActiveWindow.Close

'Since you wish to paste slides, switch the view to slide sorter or you can
also activate the thumbnail pane
ActiveWindow.ViewType = ppViewSlideSorter

ActiveWindow.View.Paste


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how.
PowerPoint 2010 (32-bit/64-bit) versions supported.

"jean-luc bonnier" wrote in
message ...
Thanks for your reply.
The sequence is the following:

ActivePresentation.Slides.Range.Copy
ActiveWindow.Close
ActiveWindow.View.Paste

Paste works on PP2003 and not on PP2007

But this VBA code seem quite obscure to me
Let me know if I can send you the whole code.

Best regards
JLuc Bonnier


"Shyam Pillai" wrote:

Hi,
Have you confirmed what is the active window when you try to paste? Are
you
trying to paste on the slide? If you know the location of the paste
location
have you tried alternate approached like using
ActivePresentation.Slides(1).Shapes.Paste?


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.

"jean-luc bonnier" wrote in
message ...
We experience problems with Visual Basic macros under Powerpoint

These macros have been developed with Powerpoint 2003 and VBA 6.1. When
executed with this environment, no problem.

Problem is when we execute them on Powerpoint 2007 and VBA 6.1 or 6.3.
Any idea for fixing this comptability problem ?

Extract of VBA code and error code:
ActiveWindow.Close
ActiveWindow.View.Paste
VBA error 80048240 on View.Paste
View (unknown member) : Invalid request. Clipboard is empty or contains
data
which may not be pasted here

I've tried to apply what is recommended in
http://support.microsoft.com/default.aspx/kb/285472?p=1
but without success.

I am quite a beginner in VBA and really don't know to debug that.
Let me know if you want to see these macros and I'll send you.

Thanks for your support
Jean-Luc (in HP Grenoble France)

  #5  
Old April 27th, 2010, 04:17 PM posted to microsoft.public.powerpoint
jean-luc bonnier
external usenet poster
 
Posts: 3
Default VBA macros Powerpoint compatibility problem

Hello,

As proposed, I added the line
ActiveWindow.ViewType = ppViewSlideSorter
before pasting.

and this fixes my problem on PP2007. I am now able to run properly the
concerned VBA macro.

I plan to run other macros in the short term. Is it possible to find
somewhere the known compatibility VBA issues between PP2003 and PP2007 ?

Many thanks for your efficient support.
Best regards
JLuc Bonnier
"Shyam Pillai" wrote:

Hi,
I can repro the problem with your code. The code basically assumes that the
view in which the presentation is in will accept the pasted slides. While
this may have worked in PPT 2003, you need to ensure that the current view
can accept the pasted contents. For example you cannot assume that the
activewindow will accept the contents of the Paste operation.

ActivePresentation.Slides.Range.Copy
ActiveWindow.Close

'Since you wish to paste slides, switch the view to slide sorter or you can
also activate the thumbnail pane
ActiveWindow.ViewType = ppViewSlideSorter

ActiveWindow.View.Paste


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how.
PowerPoint 2010 (32-bit/64-bit) versions supported.

"jean-luc bonnier" wrote in
message ...
Thanks for your reply.
The sequence is the following:

ActivePresentation.Slides.Range.Copy
ActiveWindow.Close
ActiveWindow.View.Paste

Paste works on PP2003 and not on PP2007

But this VBA code seem quite obscure to me
Let me know if I can send you the whole code.

Best regards
JLuc Bonnier


"Shyam Pillai" wrote:

Hi,
Have you confirmed what is the active window when you try to paste? Are
you
trying to paste on the slide? If you know the location of the paste
location
have you tried alternate approached like using
ActivePresentation.Slides(1).Shapes.Paste?


--
Regards,
Shyam Pillai

Handout Wizard: http://skp.mvps.org/how. PowerPoint 2010 (32-bit/64-bit)
versions supported.

"jean-luc bonnier" wrote in
message ...
We experience problems with Visual Basic macros under Powerpoint

These macros have been developed with Powerpoint 2003 and VBA 6.1. When
executed with this environment, no problem.

Problem is when we execute them on Powerpoint 2007 and VBA 6.1 or 6.3.
Any idea for fixing this comptability problem ?

Extract of VBA code and error code:
ActiveWindow.Close
ActiveWindow.View.Paste
VBA error 80048240 on View.Paste
View (unknown member) : Invalid request. Clipboard is empty or contains
data
which may not be pasted here

I've tried to apply what is recommended in
http://support.microsoft.com/default.aspx/kb/285472?p=1
but without success.

I am quite a beginner in VBA and really don't know to debug that.
Let me know if you want to see these macros and I'll send you.

Thanks for your support
Jean-Luc (in HP Grenoble France)

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.