sandrila logo Sandrila Ltd
Delphi Code
// Gets a shape's master name
function  getMasterName(shape: Visio_TLB.Shape): widestring;

function getMasterName(shape: Visio_TLB.Shape): widestring;
var
  startPos: integer;
begin
  try
    result := shape.Master.Name;
  except
    result := shape.Name;
  end;
  startPos := pos('.', result);
  if (startPos > 0) then
    result := leftStr(result, startPos-1);
end;

Home