![microsoft word table cell vertical alignment microsoft word table cell vertical alignment](https://i.stack.imgur.com/JDlEy.png)
I guess I could create a template.Īt work, we use a double-windowed envelope for mailings. Thank you for being so responsive! It kind of is a template, but I do want it to be a macro. Align./Text/Paragraphs fumei (TechnicalUser) 2 Sep 10 17:41
![microsoft word table cell vertical alignment microsoft word table cell vertical alignment](https://www.digitaldocumentsdirect.com/wp-content/uploads/2021/07/tables-centering-text-08.jpg)
Selection.PasteSpecial Link:=False, DataType:=wdPasteText, Placement:= _Ī(msoConnectorStraight, 1.05, 101.65, _ With ActiveDocument.Tables(1).Rows(4).Cells(1) VerticalAlignment = wdCellAlignVerticalCenter With ActiveDocument.Tables(1).Rows(2).Cells(1)
![microsoft word table cell vertical alignment microsoft word table cell vertical alignment](https://i.ytimg.com/vi/BSnTauAFG0A/maxresdefault.jpg)
Selection.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNoneĪctiveDocument.Tables(1).Rows(1).Height = InchesToPoints(7.13)ĪctiveDocument.Tables(1).Rows(2).Height = InchesToPoints(1.25)ĪctiveDocument.Tables(1).Rows(3).Height = InchesToPoints(0.18)ĪctiveDocument.Tables(1).Rows(4).Height = InchesToPoints(1.61) Selection.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone Selection.Borders(wdBorderVertical).LineStyle = wdLineStyleNone Selection.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone Selection.Borders(wdBorderRight).LineStyle = wdLineStyleNone Selection.Borders(wdBorderBottom).LineStyle = wdLineStyleNone Selection.Borders(wdBorderLeft).LineStyle = wdLineStyleNone Selection.Borders(wdBorderTop).LineStyle = wdLineStyleNone Selection.MoveDown Unit:=wdLine, Count:=3, Extend:=wdExtend Selection.MoveLeft Unit:=wdCharacter, Count:=1Ī Range:=Selection.Range, NumRows:=4, NumColumns:= _Ģ, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _ Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend I promise to post my results for everyone.ĭocuments.Add DocumentType:=wdNewBlankDocument
#Microsoft word table cell vertical alignment code
When I get home tonight, I'll try tweaking the code and see if your fix is the magic answer. I just can't get it to do it in the table cell.įumei - Thanks! As you can see in my code below, I tried using extend to tell VBA where to format, but it didn't really work. Alternatively, sometimes when I tweak the code, it inserts all the text after the table and formats it too. Then it ignores all the insert text and "TypeParagraph" code. I had no trouble whatsoever creating a new blank document, setting the margins, creating the table, setting the vertical alignment for the rows and creating, coloring and placing two drawing shapes in the document however, when it hits the paragraph alignment center code it just stops or ignores it. I started the whole thing by recording it, and I've been debugging it ever since.