locked
Retrieving powerpoint slide background color RRS feed

  • Question

  • hi

    I am trying to retireve the background color applied on a powerpoint slide as

    "Color.FromArgb(this.slide.Background.Fill.ForeColor.RGB).Name" .

    But the color code from the above C# code is different from what i actually applied on slide.

    for example: I applied color "#FCD5B5" on powerpoint slide but my C# code is retrieving "#b5d6fb" .

    any idea why it happens to be like this?

    Also , for some colors i get incorrect color code. for example, i see ff for red.

    please suggest.

    Regards , Sujasree

    Thursday, September 30, 2010 4:38 PM

Answers

  • Hi Sujasree

    I think you need Color.FromOLE when "translating" colors between Office and .NET?


    Cindy Meister, VSTO/Word MVP
    Friday, October 1, 2010 6:35 AM

All replies

  • Hi Sujasree

    I think you need Color.FromOLE when "translating" colors between Office and .NET?


    Cindy Meister, VSTO/Word MVP
    Friday, October 1, 2010 6:35 AM
  • Thank you. it worked.

    Regards, Sujasree

    Friday, October 1, 2010 12:41 PM
  • Its ColorTranslator.FromOle(this.slide.Background.Fill.ForeColor.RGB).Name
    Friday, October 1, 2010 12:42 PM