Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7420061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:10:26+00:00 2026-05-29T08:10:26+00:00

I am working with Delphi(2010), but I’m new with PowerPoint(2010) I’ve found two codes

  • 0

I am working with Delphi(2010), but I’m new with PowerPoint(2010)

I’ve found two codes for copying slides with “keep source formatting”:

Sub test1()
Dim orig_slide, new_slide As Slide
Dim slide_range As SlideRange

    Set orig_slide = ActivePresentation.Slides(2)
    orig_slide.Copy
    Set slide_range = ActivePresentation.Slides.Paste(6)
    Set new_slide = slide_range.Item(1)

    new_slide.Design = orig_slide.Design
    new_slide.ColorScheme = orig_slide.ColorScheme
End Sub

Sub test2()
    ActivePresentation.Slides(2).Select
    ActiveWindow.Selection.Copy
    ActiveWindow.View.PasteSpecial (DataType = ppPasteOLEObject)
End Sub

They both are giving desired results in PowerPoint but in Delphi i get exceptions :

test1, line

new_slide.Design = orig_slide.Design

exception class EOleSysError with message ‘Member not found’

test2, line

ActiveWindow.View.PasteSpecial (DataType = ppPasteOLEObject)

exception class EOleException with message ‘View.PasteSpecial : Invalid request. The specified data type is unavailable’

I am using Slide Sorter View, copying and pasting are working ok, I’m only trying to add “keep source formatting” command.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:10:27+00:00Added an answer on May 29, 2026 at 8:10 am

    I think I’ve found a solution :

    This code in Delphi (doesn’t work)

    var OrigSlide, NewSlide : Variant;
    NewSlide.Design := OrigSlide.Design;
    

    on the right side, Delphi seems to accept only variant_variable, it doesn’t accept variant_variable.property

    Left side seems to work in opposite way ?!?

    When I replaced it with this code, it works

    OrigSlide := OrigSlide.Design;
    NewSlide.Design := OrigSlide;
    

    But I can only guess why.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are currently working with Delphi 2006, but we are now very ready to
After installation of Delphi 6 at new working station I issued problem with breakpoints.
I'm currently working on porting an existing Delphi 5 application to Delphi 2010. It's
I'm working in Delphi (and Delphi terminology), but my question is language neutral. Suppose
I'm trying to pass information between two of my applications in Delphi 2010. I'm
I am working with Delphi 2010 and the ShellAPI. I need a little help
I'm working in Delphi 2007. Net, where I can find an example of using
I followed these instructions while trying to get remote debugging working with Delphi 2007.
Ok, this is a curly one. I'm working on some Delphi code that I
Working on a service application in Delphi 5 that is intended to run on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.