View Single Post
 
Old 11-18-2023, 11:02 AM
RobiNew RobiNew is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Question Microsoft Learn - Title: Range.InsertAfter method (Word)"

I found the code here below in "Microsoft Learn - Title: Range.InsertAfter method (Word)"
But it seems to fail. Can someone explain? Thanks!

Code:
Set doc = ActiveDocument 
Set rngRange = _ 
 doc.Range(doc.Paragraphs(1).Start, _ 
 doc.Paragraphs(1).End - 1) 
rngRange.InsertAfter _ 
 " This is now the last sentence in paragraph one."
Reply With Quote