none
Access footer text of PPTX on PowerPoint 2003 Add-in project on Visual Studio 2008 RRS feed

  • Question

  • Hi, team!

    I have a Powerpoint 2003 Add-in project in my Visual Studio 2008, in C#. I use the following code to read the text of the footer from a Powerpoint presentation:

    String currentFooterText = 
    Application.ActivePresentation.SlideMaster.HeadersFooters.Footer.Text;

    (where Application class comes from the namespace Microsoft.Office.Interop.PowerPoint.Application)

    When I load a ppt file (97-2003 Presentation type), the code is able to access the text that was inserted in the Footer property of the Slide (menu View > Head and Footer... > Slide > Footer).

    But, when I load a pptx file (Presentation created in Powerpoint 2007 or 2010), the code is not able to access the text that was also inserted in the Footer property of the Slide (menu Insert > Head and Footer... > Slide > Footer). The Text returns a blank text.

    Please, does anyone have any idea about that? Is there any incompatibility between these Powerpoint versions for footer access? How can I access the footer text of the pptx file in my project?

    Thank you!

    Thursday, March 14, 2013 8:27 PM

All replies

  • Hi Paulo, 

    Try with: ActivePresentation.Slides(1).HeadersFooters.Footer.Text

    Good day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, March 18, 2013 8:37 AM
    Moderator
  • Hi, Yoyo Jiang!

    Thanks for the reply!

    In fact, my code is on Visual Studio 2008, for a Powerpoint 2003 Add-in project. And the problem happens when I open a pptx file.

    I tried your suggestion, but with brackets instead of the parenthesis (parenthesis generates compilation error), like below:

    String s = Application.ActivePresentation.Slides[1].HeadersFooters.Footer.Text;

    But the problem persists, the Text still returns empty for pptx files. It works for ppt, like before. Do you know any programmatic way to use on VS 2008, for a Powerpoint 2003 Add-in project, to access the footer text of a pptx file?

    Thank you!
    Monday, March 18, 2013 12:22 PM
  • Sorry, I can't help. I'm unaware of such a way to do it and I'm afraid that we need to develop an addin for PowerPoint 2007 format file (PPTX).

    Good day.


    Yoyo Jiang[MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Thursday, March 21, 2013 6:22 AM
    Moderator