Setting autoshape defaults thru' VBA gives unwanted indentations

P

Purvi Sheth

Hi,

I'm having problems setting an autoshape as default
programmatically. Basically I'm trying to make an
unformatted autoshape as a default using VBA code.

I create a new textbox without any indentations (0 left
indent and 0 first indent) programmatically and then set
it as default. After that any new textbox is added, it has
some indentation although the rulers show all indentations
as 0. I cannot remove the indentations no matter what.
Note that the indentation remains the same as in the
previous default autoshape.

I tried doing the same thing manually - create new textbox
and set as default. This works fine.

I'm not able to figure out where I am going wrong. Is this
a Powerpoint bug? I would appreciate if anyone could
suggest a solution or workaround for this.

Thanks,
Purvi
 
S

Shyam Pillai

Purvi,
I've never got the SetShapeDefaultProperties method to work with text
properties. You might want to to just select the shape and execute the 'Set
Autoshape Defaults' menu command programmatically. That does the trick.


--
Regards
Shyam Pillai

Image Importer Wizard
http://www.mvps.org/skp/iiw.htm
 
P

Purvi Sheth

Thanks Shyam. But this method also does not work for all
powerpoint files. It still gives me a default indentation
depending upon the previous default autoshape.

Thanks for the help.

Regards,
Purvi
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top