![]() |
|
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
Hello Pros,
I again beg for your help, guidance. I feel I'm so close to the correct script. I can't figure out what I'm doing wrong. I wish to Select most cells in the first column, which are align to the left. IF the Left Indent = 0 AND First Line Indent = 0 Then .Left Indent = 0.17 .First Line Indent = -0.11 (which both combination has a reality of 0.06 Indentation) Else .Left Indent = 0.36 .First Line Indent = 0.11 (which both combination has a reality of 0.25 Indentation) What is happening to me, the first selected cell, ok corrects it, but since it's still selected, then it does the Else line, so all the selected cells, becomes 0.25. I have so many tables to fix (and that is one of my big problems). Here is the full script I've created: Code:
Sub test2_T1fr_If_Cell_0v00_put0v06() Dim aTbl As Table, oCel As Cell Set aTbl = Selection.Tables(1) Selection.SelectCell With Selection.ParagraphFormat .RightIndent = InchesToPoints(0) .Alignment = wdAlignParagraphLeft '.FirstLineIndent = InchesToPoints(-0.11) .OutlineLevel = wdOutlineLevelBodyText .CharacterUnitLeftIndent = 0 .CharacterUnitRightIndent = 0 '.CharacterUnitFirstLineIndent = 0 End With Selection.SelectCell With Selection.ParagraphFormat If .LeftIndent = InchesToPoints(0) And .FirstLineIndent = InchesToPoints(0) Then .LeftIndent = InchesToPoints(0.17) 'Reality = 0.06 .FirstLineIndent = InchesToPoints(-0.11) Else .LeftIndent = InchesToPoints(0.36) 'Reality = 0.25 .FirstLineIndent = InchesToPoints(-0.11) End If End With 'Next oCel Set oCel = Nothing: Set aTbl = Nothing On Error GoTo 0 End Sub Please, any guidance. I would be so grateful for insights ![]() *********************** (second issue, is a request for an advice = I wish to do a copy and paste each table numbers which a macro formated to the needs I have. However, each tables has at least 3 rows where it's full. So for example, 3 columns for 20 rows, then 1 full row (merge I guess), then another 5-6 rows, then 1 full row again, etc. So my issue is I'm trying to paste my formated numbers on the two last columns but I can't select the columns I need due to these anoying merge cells. So I have to select each row that is full, and split them in either 3 columns or more, depending on the tables. When you have over 200 tables, I feel like crying. Any advice you could share with me) Cendrinne |
Tags |
advice, help me, left indent |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to indent first line from second paragraph of every heading? | indra059 | Word | 3 | 02-22-2022 08:20 PM |
![]() |
gabelman | Word | 3 | 10-04-2018 11:51 AM |
Difference between first line Indent and Left Indent | kingston123 | Word | 3 | 09-25-2018 02:47 PM |
Don't indent the fist line of the first paragraph after a style change | Inspirement | Word | 1 | 04-08-2012 05:30 AM |
No indent first line of first paragraph of new section | RogRhein | Word | 0 | 10-10-2010 09:52 AM |