Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-14-2021, 09:06 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Help with Removal of 1 shape margins... Windows 10 Help with Removal of 1 shape margins... Office 2019
Competent Performer
Help with Removal of 1 shape margins...
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 190
Cendrinne is on a distinguished road
Question Help with Removal of 1 shape margins...

Hello pros,
I also need help how to write a script to have a macro to remove 1 shape margins on all sides. The default are: Left and Right = 0.1", Top and Bottom = 0.05".

I've tried to change them to all 0" by Default, but it came back to the original state.
I've tried to change it in the Normal.dotm Default textbox, but nope, didn't do anything.



So recording my steps was fruitless, because it didn't record the part of removing the margins, and I found No already Word tool to put in the ribon.

Any suggestions, pros?

Cendrienne
Reply With Quote
  #2  
Old 11-14-2021, 09:58 PM
Guessed's Avatar
Guessed Guessed is offline Help with Removal of 1 shape margins... Windows 10 Help with Removal of 1 shape margins... Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,969
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Try this code to set zero margins on the selected shapes
Code:
Sub SetTextPadding()
  Dim aShp As Shape
  For Each aShp In Selection.ShapeRange
    With aShp.TextFrame
      Debug.Print .TextRange.Text
      .MarginTop = 0 
      .MarginBottom = 0
      .MarginLeft = 0
      .MarginRight = 0
    End With
  Next aShp
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
help me, shape margin removal



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fit text to shape / Place table in shape Floppy PowerPoint 0 04-01-2021 11:01 AM
How to change size / shape of a shape in a stencil tomgoodell Visio 1 06-30-2016 04:40 AM
Help with Removal of 1 shape margins... Removal first 7 typos Chetan Seebra Excel Programming 2 03-31-2015 12:57 PM
how to center a title within the page margins not the document's margins in word 2013 wondermuse Word 1 12-31-2014 11:32 PM
Help with Removal of 1 shape margins... Original view included margins; now can only see side margins Sarah_B Word 3 10-15-2013 09:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft