Paragraph Indent

Hi,

I am using following applescript code to Left indent all paragraphs in slide 1.
But this code gives me error "

".

Can anyone help me on this.

tell application "Microsoft PowerPoint"
	tell slide 1 of active presentation
		tell text range of text frame of shape 1
			repeat with i from 1 to count of paragraphs
				set left indent of paragraph format of paragraph 1 to 5
			end repeat
		end tell
	end tell
end tell

Thanks,
Gopal

I created a new Powerpoint presentation with one shape with a text field on the first slide, ran your script, and it worked fine.

So can’t help with what I’ve got to go on now, because I can’t recreate the error.

Can you post a link to a presentation I can download that’s giving you the error?

It seems that there is a typo.
I guess that the instruction :

set left indent of paragraph format of paragraph 1 to 5

must be :

set left indent of paragraph format of paragraph i to 5

Yvan KOENIG running High Sierra 10.13.5 in French (VALLAURIS, France) dimanche 24 juin 2018 10:21:44

Oh, that’s a good point. It worked on my test because I only bothered making one paragraph in my test document.

However, that typo would explain the result if the OP were getting only the first paragraph indented, but not all the rest. But he said he’s getting an error message… fixing the typo you noted should only fix it so all paragraphs get indented, not prevent an error message.

Hi,

Thanks for the reply.

I am using Powerpoint 2011 Version on Mac OSx 10.9.5.
I am posting my file in this link

PPT: https://drive.google.com/open?id=1SluXFv-T3hBc9lH4gFuSIGDrGdZU4jnO
Applescript: https://drive.google.com/open?id=1QnQh_MIQI2y8k6nERX0N2vSd8WGkHNV7

Can i get any help on this,

Thanks,
Gopal

I downloaded your slide deck, ran the script with Yvan’s correction, and it worked perfectly.

So… sorry, I can’t recreate the error, I don’t know how to help.