Applescript Indesign: Add leading Zeros to page numbering

Hi All

I’m creating a new doc from scratch but I need the auto page numbering to have 3 leading zeros, Can someone help me with the syntax? I’ve found references to ‘numbering format’ and ‘triple leading zeros’ in the directory, but I keep getting the following error when trying to set them to page 1.

Adobe InDesign CC 2015 got an error: Can't set numbering format of page 1 of document id 461 to triple leading zeros.

thanks again.

Shane


tell application "Adobe InDesign CC 2015"
	-- set user interaction level of script preferences to never interact
	activate
	--
	--
	make new document with properties {document preferences:{page width:"110mm", page height:"219", pages per document:15, facing pages:false, allow page shuffle:false, document bleed top offset:0, document bleed uniform size:true}}
	--
	--
	set myDoc to document 1
	--
	set selection to master spread 1 of myDoc
	tell master spread 1 of myDoc
		set myRectangle to make rectangle with properties {fill color:"None", stroke color:"None", stroke weight:0, geometric bounds:{59, 29, 221, 110}}
	end tell
	
	set numbering format of page 1 of myDoc to triple leading zeros
	
	(*
	Adobe InDesign CC 2015 got an error: Can't set numbering format of page 1 of document id 461 to triple leading zeros.
	*)
	
	
end tell

Hi. An automatic page number is a Marker, but numbering format pertains to the Bullets and Numbering feature, which applies faux headings to list items. You might try the section object. In my version, section can only prepend zeroes; it’s not intelligent enough to adjust them without user intervention; i.e., if you assign a leading zero, when 09 should change to 10, it will read 010. You need to create new section divider for each logical break”or otherwise manually adjust your numbers.