Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Still Looking for Publisher Text Box Linking Help

Status
Not open for further replies.

Brante

Vendor
Aug 18, 2011
3
0
0
I posted last year a question which I did get advice on, but doesn't completely resolve my needs, I am looking for a reasonably simple method in which I can fill in text boxes on one publisher page, and have a copy of the text in those boxes automatically pasted into text boxes on other publisher pages - the purpose is for doing product labeling and batch codes, so that I can from a single page, enter all the new batch codes and have them sent to the individual product label pages and pasted into them (4 labels per page). Any help explaining how I could do this would be greatly appreciated, thank you!
 
Have you tried using a single page for each product label, and printing the pages '4-up' - four pages on a single sheet ?

Fred Wagner

 
Hi Fred, I already have that all set up, 4 labels per page etc. I have about 25 pages of labels. I think that Text Box Linking is a rough solution to what I need, but a more advanced solution would still be nice.
 

hi,

My knowledge of publisher extends to the spelling of the application. ;-)

However, all of MS applications use objects. VBA Help should help. The Object Browser in the VB Editor will help.

This might help faq707-4594

Using some exploratory code might help
Code:
Sub test()
    Dim pg As Page, sp As Shape
    
    For Each pg In ThisDocument.Pages
        Debug.Print pg.Name
        For Each sp In pg.Shapes
            Debug.Print sp.Name
        Next
    Next
End Sub
View the Immediate Window to see the Debug.Print results.

Look at the Object Model to see the Properties and Methods available of any Object.

So when you determine 1) how to identify the lable of interest in each page and 2) what object you enter the text into, your code might look something like this...
Code:
Sub test()
    Dim pg As Page, sp As Shape
    
    For Each pg In ThisDocument.Pages
        Select Case pg.Name
           Case "Page 1"  'substitute your actual page name here where you are entering your data
           Case Else
           'assign the text you enter on Page(1) to the label in subsequent pages
               pg.shapes("WhicheverOne").Text = Pages(1).Shapes("MyText).Text
        End Select
    Next
End Sub

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 

This assumes the FIRST textbox on each page.
Code:
Sub test()
    Dim pg As Page, sp As Shape
    
    For Each pg In ThisDocument.Pages
        Select Case pg.PageIndex
            Case 1
            Case Else
               pg.Shapes(1).TextFrame.TextRange.Text = Pages(1).Shapes(1).TextFrame.TextRange.Text
        End Select
    Next
End Sub

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top