View Single Post
 
Old 02-09-2016, 05:57 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,371
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your attached document is not suitable for a label mailmerge, which is what you'd need. Label merges use tables and the mergefields must go in the table cells, not in shapes on the page.

As for generating curved text, that requires some complex field coding using PRINT fields, which have to be encoded to suit your particular printer's code language. For example, the following PRINT field could be use with a postscript printer to print text around a circle anywhere on the page:
Code:
{PRINT \p page "
/pi 3.14159265358979 def
% The circletext routine describes how to print text in a circle
/circletext
      {cirtextdict begin
           /radius exch def
           /centreangle exch def
           /ptsize exch def
           /str exch def
           /xradius radius ptsize 3 div sub def
           gsave
             centreangle str findhalfangle sub rotate
             str
               {/charcode exch def
                ( ) dup 0 charcode put placechar
               } forall
           grestore
         end
      }def
/cirtextdict 20 dict def
cirtextdict begin
  /findhalfangle
    {stringwidth pop 2 div
      2 xradius mul pi mul div 360 mul
    }def
/placechar
 {/char exch def
   /halfangle char findhalfangle def
   gsave
     halfangle rotate
     radius 0 translate
     90 rotate
     char stringwidth pop 2 div neg 0 moveto
     char show
   grestore
   halfangle 2 mul rotate
 }def
end
% Define the circle's size, position and text
wp$x wp$right sub wp$left add 2 div wp$y wp$top sub wp$bottom add 2 div translate
/Right 0 def                           % Set the circle's horizontal position
/Up 0 def                              % Set the circle's vertical position
/CRadius 45 def                        % Set the circle's radius
/TRadius CRadius 4 sub def             % Position the text inside the circle
/Text (The quick brown fox jumps over the lazy dog.) def
/MyCircle {/saveobj save def           % save current state
            .5 setlinewidth            % set thickness of line
            newpath                    % create a new path
            Right Up CRadius 0 360 arc % define the circle's arc
            closepath stroke           % close the path and draw it
            /Courier findfont          % select the font
            9 scalefont setfont        % set the font size & make it current
            Right Up translate         % set a new origin to match the circle
            Text        % the text to output
            180 rotate Text
            8 270 TRadius circletext   % use the circletext to write the text
            saveobj restore} def       % restore current state
% Output the result
MyCircle"}
The above PRINT field contains the postscript commands to both generate the circle and print the curved text. Colour is not catered for - and I'm not sufficiently well versed with postscript to add it; I haven't worked with postscript for a decade.

There are a numerous variables in the latter parts of this code that you could adjust. First off, for a mailmerge, you'd replace the 'The quick brown fox jumps over the lazy dog.' text with your merge fields. You could also change the circle’s position, defined by the ‘Right’ and ‘Up’ coordinates, its radius ‘Cradius’ and the radius of the text ‘TRadius’ – in this case, ‘CRadius 4 sub’ puts the bottom edge of the text 4pts inside the circle, whereas ‘CRadius 5 add’ would put it 5pts outside the circle. These units are all in points. Similarly, you could change the ‘0 360’ to alter the start and end points of the arc, which you can also leave open by deleting ‘closepath’.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote