Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-17-2025, 10:40 PM
gcp gcp is offline Word page numbering Windows 11 Word page numbering Office 2021
Novice
Word page numbering
 
Join Date: Mar 2025
Posts: 17
gcp is on a distinguished road
Default Word page numbering

I recorded a macro to number pages. it includes:
Application.Templates( _
"C:\Users\gcpri\AppData\Roaming\Microsoft\Docu ment Building Blocks\1033\16\Built-In Building Blocks.dotx" _
).BuildingBlockEntries("Brackets 1").Insert Where:=Selection.Range, _
RichText:=True

When I run the macro it highlights the above in yellow and says:
"Run-time error '5941'. The requested member of the collection does not exist."
The cursor stops in the document in the footnote where the page number is to be inserted.
I have recorded the macro several times and occasionally the VB Editor refers to the building blocks but it does not stay there when I record other macros.


Allied to this is, when I record a macro can I allocate a project (or create a project) to contain the macro. The online help suggests that I have to go to the editor, start a new module and then cut and paste the code into that module.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Numbering Page in Center of Page in Word AdmirableWizard Word 3 04-26-2022 10:55 AM
Word 2019 & Page Numbering PapaTom Word 18 12-13-2019 08:02 AM
Word page numbering Word 10 Page Numbering DarenKF Word 2 11-08-2017 01:43 AM
Word page numbering Page-numbering question: continue numbering from one section to the next? {PAGE} of {SECTIONPAGES} SDwriter Word 12 10-25-2017 06:56 AM
Word page numbering Page Numbering in Word dickmill Word 10 01-11-2016 04:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:51 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