Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-14-2023, 05:07 AM
suuki suuki is offline Problem with quick parts Windows 11 Problem with quick parts Office 2016
Novice
Problem with quick parts
 
Join Date: May 2023
Posts: 1
suuki is on a distinguished road
Default Problem with quick parts


Hi there. I am trying to use this feature to replace a text with another.
I have already selected the text and went to quicks parts/autotext/save selection to autotext gallery


However when I run the macro, I got the error 5941, telling that the element doesn't exist. I checked the name used to save the selected text and it is correct, so I dont know what is the problem.


The macro is the following:


Sub Document_Open()
SubstitutePage
End Sub
Sub AutoOpen()
SubstitutePage
End Sub
Sub SubstitutePage()
ActiveDocument.Content.Select
Selection.Delete
ActiveDocument.AttachedTemplate.AutoTextEntries("a ne").Insert Where:=Selection.Range, RichText:=True
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with quick parts Quick Tables disappear when emailed - quick parts / building blocks silawtz Word 5 11-03-2022 07:44 PM
Problem with quick parts Quick Parts-Need to be removed from TOC Isaac Word 3 05-11-2017 04:43 AM
Problem with quick parts Quick Parts Fields? brucemc777 Word 2 02-16-2016 12:57 PM
Problem with quick parts Quick Parts tmneal74 Word 1 11-13-2012 06:04 PM
Problem with quick parts Quick parts in doc file alokmay Word 1 06-14-2011 04:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft