I set it up as a Windows app because it's convenient to use the auto page numbers in master pages to quickly rebuild a document template after major changes in layout, and then reset the new document template's headers and footers to "Page (#) Header" or "Page (#) Footer" with real numbers instead of automatic ones, so I can set those using the FindChangeByList script later (after somebody tells me what they're really going to say). This code would probably work with a few modifications as Vbscript:
'Set up application and document objects Dim IDapp As InDesign.Application = New InDesign.Application Dim myDoc As InDesign.Document = IDapp.ActiveDocument 'Set up string variables
Dim findString As String = "Page <0018>" 'Search for the value in the Master text box IDapp.FindTextPreferences.FindWhat = findString 'Find all instances of the find string and place in an array
Dim foundHead = myDoc.FindText()
Dim chngString As String = "" 'If the string was found If foundHead.Count > 0 Then 'Get the page number of the text box footer string appears in Dim pnum As Integer = 0 Dim i As Integer = 1 'Loop through the instances For i = 1 To foundHead.Count pnum = foundHead(i).parentTextFrames(1).parent.name chngString = "Page " & pnum IDapp.ChangeTextPreferences.changeTo = chngString 'Change this instance foundHead(i).ChangeText()
Next 'Announce completion MsgBox("Find and Replace operation finished.")
Else 'Report failure MsgBox(ControlChars.Quote & findString & ControlChars.Quote & " not found.") 'End If for whether search string was found
End If
If you just wanted to find the number placeholder, obviously leave out the "Page" part of the find string and change string. Kathe Todd
Audio Editions
kathe-t@audioeditions.com
-----Original Message----- From: InDesign Talk [mailto:indesign@lists.lassosoft.com] On Behalf Of Michael Brady Sent: Monday, June 07, 2010 10:07 AM To: InDesign Talk Subject: [SPF - SPAM] - Converting automatic page numbers to fixed numbers
Is there a way to do that? ID has a command to convert automatically numbered paragraphs to fixed numbers, so I thought there might be a way to convert autopage numbers (on the live page, not on the MP) to editable text. CS5 or CS4?
| | | | | | | | | | | | | | | | | | | Michael Brady -- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!