View Single Post
 
Old 07-18-2023, 09:46 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Using a selection object in a range other than the body of the document might be where the problem is coming from. Or perhaps the txtName textbox is no longer available.

If you tried using Range instead of Selection you may get it working better. Note that 'replacing text at a bookmark' is normally problematic as the contents of the bookmark are removed and the text appears beside (not inside) the bookmark unless steps are taken to handle this. See the following thread for inspiration
https://www.msofficeforums.com/word-...-bookmark.html
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote