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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:57:58+00:00 2026-05-21T19:57:58+00:00

I use Microsoft.Office.Interop.PowerPoint to generate powerpoint files from a C# application. I’m on Office

  • 0

I use Microsoft.Office.Interop.PowerPoint to generate powerpoint files from a C# application.
I’m on Office 2007 SP2.

I generate charts, and I want to defines the colors of my series with something like this:

serie.Border.Color = Color.Red.ToArgb(); 

and I do this with different colors.

My problem is that when the slides are generated, the colors are not the same : when I define a serie in Red, it is drawn in Blue, and the Blue is rendered in Red. (The green stays green).

Isn’t the ToArgb() the method to use when I want to send a color to powerpoint?
Do I have to use an other method from the Color type, or is there a manual conversion to do?

  • 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-21T19:57:59+00:00Added an answer on May 21, 2026 at 7:57 pm

    I came across the same problem a few years ago. It really is strange and I couldn’t find any documentation about it, but basically, red and blue are mixed.

    Back then, I wrote these methods:

    public static int ToBgr(this Color color)
    {
        return ToBgr(color.R, color.G, color.B);
    }
    
    public static int ToBgr(int r, int g, int b)
    {
        //  & 0xFFFFFF -> Strip away alpha channel which powerpoint doesn't like
        return Color.FromArgb(b, g, r).ToArgb() & 0xFFFFFF;
    }
    

    Use it like this:

    serie.Border.Color = Color.Red.ToBgr(); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We want to use Microsoft.Office.Interop.Excel in our web application. Everything works fine on our
I want to use Microsoft.Office.Interop.Excel dll to write the data into excel sheet. I
I have an application that uses Microsoft.Office.Interop.Excel to pull data from an Excel workbook.
What I want to do I'm trying to use the Microsoft.Office.Interop.Excel namespace to open
I am writing an application which uses the Microsoft.Office.Interop.Excel assembly to export/import data from
We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use
Issue: I am using the Microsoft.Office.Interop.Excel library in an ASP.NET application, and I have
I have created a windows application which makes use of Office.dll and PowerPoint dlls
We developed an application that uses Excel interop libraries (Microsoft.Office.Interop.Excel) to read some Excel
I tried to use F# read a xls file as below open Microsoft.Office.Interop.Excel let

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.