I am still starting with this. Can you tell me why this does not format the selection?
Selection.TypeText "title" With Selection .Font.Bold = True .Font.Name = "Arial" .Font.ColorIndex = wdDarkBlue .ParagraphFormat.Alignment = wdAlignParagraphCenter .ParagraphFormat.SpaceAfter = 0 End With
It formats the text, but only text is added after the With Selection command.
With Selection
Change the order, put Selection.TypeText "title" last and it will work. :)
Selection.TypeText "title"
Source: https://habr.com/ru/post/1446268/More articles:switching text to faded image to / from - jqueryDTD validation failure (Python) - pythonUsing a Perl Module with Empty Parentheses - perlHow to remove changes using git -p4 - gitPython 3.3: .zip not recognized if name changed at boot - pythonRunning grep from a java program - javaHow to make a field read-only outside the class - access-modifiersNHibernate free table naming convention does not work - conventionsInstalled VS2012 - now it is impossible to connect to the SQL server with SSMS - sql-serverOpen and close a program using the same hotkey (Autohotkey?) - autohotkeyAll Articles