Setting autoshape defaults thru' VBA gives unwanted indentations

  • Thread starter Thread starter Purvi Sheth
  • Start date Start date
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
 
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
 
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
 
Back
Top