Macro Resize_to_Frame_Specify_Border Define LeftCoord as Float Define RightCoord as Float Define TopCoord as Float Define BottomCoord as Float Define Height as Float Define Width as Float Define ScalePercentage as Float Define BorderSize as Float BorderSize = .1 #Groups selection. Group Selection #Determines all sides of grouped art. Create object_Info ActiveDoc.FirstSelectedElement ActiveDoc.FirstSelectedElement.Info.View_Context.type = "extent" Leftcoord = ActiveDoc.FirstSelectedElement.Info.View_Context.Rectangle.Left RightCoord = ActiveDoc.FirstSelectedElement.Info.View_Context.Rectangle.Right TopCoord = ActiveDoc.FirstSelectedElement.Info.View_Context.Rectangle.Top BottomCoord = ActiveDoc.FirstSelectedElement.Info.View_Context.Rectangle.Bottom #Determines height and width of grouped art. Height = TopCoord - BottomCoord Width = RightCoord - LeftCoord #Determines resize scale. If (Height > Width) then ScalePercentage = ActiveDoc.window.pageY/(Height+BorderSize) Else ScalePercentage = ActiveDoc.window.pageX/(Width+BorderSize) End If #Scales the grouped art to proper size. Scale Selection LeftCoord BottomCoord ScalePercentage ScalePercentage #Recentered the art. Cut Zoom Page Paste #Clears temp grouping. Ungroup Selection #Clears selection. Select None End Macro