![]() |
#2
|
|||
|
|||
![]()
That is working to do what you told it to do "Insert a tab after the the last character in paragraph 1. If you want it at the end of the "current" paragraph then you can use:
Code:
Sub ScratchMacro() 'A basic Word Macro coded by Gregory K. Maxey Selection.Paragraphs(1).Range.InsertAfter vbTab lbl_Exit: Exit Sub End Sub By the way, you don't ever have to use: "With Active Document ... End With Especially when you are only doing one thing. Simply use: ActiveDocument.Paragraphs(1).Range.InsertAfter vbTab |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Delete the current paragraph by just one click without selecting it | RobertDany | Word VBA | 2 | 10-10-2021 09:55 PM |
Inserting text from a Userform into a Field in a paragraph in a paragraph in a word document | storemaz | Word VBA | 1 | 03-13-2020 08:11 AM |
syntax for inserting blank line before inserting table and after a line or paragraph | SamDsouza | Word VBA | 8 | 08-04-2019 11:10 PM |
inserting an image at current position | stewarto | Word VBA | 7 | 03-21-2017 02:37 PM |
A macro that moves the current paragraph up or down? | New Daddy | Word VBA | 2 | 04-13-2014 02:25 PM |