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 641717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:05:35+00:00 2026-05-13T21:05:35+00:00

I need a application to copy text and images form PowerPoint to Word. I

  • 0

I need a application to copy text and images form PowerPoint to Word. I use this libraries: Microsoft.Office.Interop.PowerPoint and Microsoft.Office.Interop.Word.

The text s easy to transfer, but when I find in PowerPoint a shape containing only a image, it show this error: “A generic error occured GDI+“, at this part of code:

foreach (PowerPoint.Shape shape in slide.Shapes)
{
   if (shape.HasTextFrame != MsoTriState.msoTrue){
      shape.Copy();
      Image img = (Image)Clipboard.GetData(DataFormats.Bitmap);
      string filepath = Environment.SpecialFolder.Desktop + "\\img.jpg";
      if (File.Exists(filepath))
      {
         File.Delete(filepath);
      }
      img.Save(filepath);
      doc.Shapes.AddPicture(filepath, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
   }
}

How can I copy a shape containing a image from PowerPoint to Word in this cirumstances?
Any help is welcome. I prefer some code sample.

Thanks.

  • 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-13T21:05:36+00:00Added an answer on May 13, 2026 at 9:05 pm

    If you rewrite your code like this, will it work? GetImage will do an automatic conversion to make sure it’s an image. If you know it’s a bitmap you could include the check I have in the code to ensure the clipboard actually contains an image.

    shape.Copy();
    bool imgOk = Clipboard.ContainsImage();
    if (imgOk)
    {
        Image img = Clipboard.GetImage();
        MessageBox.Show(imgOk.ToString());
        string filepath = @"c:\temp\img.jpg";
        if (File.Exists(filepath))
        {
            File.Delete(filepath);
        }
        img.Save(filepath);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need my QT application to create a table and copy this table into
I'm developping an android application, and a need to copy text (from listView item)
I need to refactor a .dll for a Zinc based Flash application. After copy&paste
I have a need to generate complicated text files from a Java desktop application.
I need to develop an application to copy the contents of .jrn file as
I have a 3rd party application from which I need to copy texts and
I need to copy a specific item of text (one or a few words)
I have a web application that receives a simple text file, but I need
I need to make an application which copies the highlighted text . I tried
I need to encrypt a text string in a .net application using a known

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.