2 macro help required!! 1. extract page name & 2. create a unique name of text

i have 2 requirements but need in separate codes for both requirements

1. i want to extract multiple page name of a document for example i have 50 pages in a document all have different page names and want to extract all page name in the form of paragraph or artistic text in corel

2. create a unique name of 3 alphabet from artistic text or paragraph text for example Parag (PAR), Corel (COR), Question (QUS) etc?

Parents
No Data
Reply
  • You could try this for getting text from the page names:

    Sub text_from_page_names()
    Dim strText As String
    Dim p As Page

    For Each p In ActiveDocument.Pages
    strText = strText & Chr(13) & p.Name
    Next p

    ActivePage.ActiveLayer.CreateParagraphText ActivePage.LeftX, ActivePage.TopY, ActivePage.RightX, ActivePage.BottomY, strText

    End Sub

Children