Accessing a TextBox Control is Powerpoint

Hi,
I’m trying to extract text from ActiveX text boxes in the first slide of a PowerPoint presentation. I’ve got a presentation with a TextBox control called TextBox1, and the Text/Value properties set to some text. When I try accessing this text, all I get is null. If I debug it line by line, I can also see that there are absolutely no properties available in the control to interrogate.

Am I doing something wrong?

string path = @“C:\Jobs\12345\presentation1.pptx”;

        Presentation p = new Presentation(path);
        ISlide slide = p.Slides[0];
        foreach (IControl c in slide.Controls)
        {
            if (c.Name.Equals("TextBox1"))
            {
                string text = c.Properties["Text"];                    
            }
        }

After this, “text” is null.

Cheers,
Mike

Hi,

I have observed the requirements shared by you and request you to please share the sample presentation with us for which you are trying to access the text box. I will investigate the issue further on my end to help you out.

Many Thanks,

Hi,



Thanks for this. I’ve attached the file. Just an empty file except for a TextBox…



Cheers,



Mike

Hi Mike,

I have observed the presentation file shared by you and it seems you have ActiveX text box in your presentation. These are not considered as normal PowerPoint shapes and dealt differently. Please visit this documentation link for your kind reference in this regard.

Many Thanks,

Hi,

Thanks for the link. I had seen it and based my own code off that. I have however, just copied the entire code list and a copy of the test presentation, and it works fine.

However, if I create a new pptm of my own, fresh and empty except for a textbox, it doesn’t work. It can’t find the properties of the ActiveX control.

Any ideas why a brand new presentation doesn’t work but your supplied one does?

Cheers,
Mike

Hi Mike,


I have observed the requirements shared by you and request you to please share the sample presentation with me that is having issue on your end. I will investigate the issue further on my end to help you out.

Many Thanks,

Hi,



Sorry about the delay between posts - this isn’t a project I seem to be working on very often.



Just updated to the latest version of Aspose Total.Net, it hasn’t helped.



I’ve included a zipped project. It started as the template downloaded from your website. That worked. When I added extra text boxes, it stopped working.



Don’t know whether it makes a difference, but I’m using PowerPoint 2013…



Any further help would be appreciated.



Cheers,



Mike

Hi Mike,


I have worked with the sample project shared by you and have been able to observe the issue while accessing the property values of added ActiveX components. An issue with ID SLIDESNET-35434 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,