macro request - grab text object label and pass to page name

Is it possible to create a macro that grabs the contents of a labelled text object and pass it onto the page name?  Example below.  Here I want the text object to have the label 'sku'.

Parents Reply
  • What code would you use to copy selected text to a page name? My page header includes a line of text that has a sign type and a descriptor. I would like to just use the sign type to name the page. So I would like to highlight the sign type and run the code to rename the page.

    Quick-and-dirty, you could use this:

    ActivePage.Name = ActiveShape.Text.Selection

    That assumes that some range of characters are currently selected in a Text shape.

    There are no safeties built into that to prevent errors (if nothing is selected, if the selection is not a text shape, etc.).

Children