Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-20-2021, 06:21 AM
p45cal's Avatar
p45cal p45cal is offline Adapting Macropod's Acronym Word VBA Code for Excel Windows 10 Adapting Macropod's Acronym Word VBA Code for Excel Office 2019
Expert
 
Join Date: Apr 2014
Posts: 948
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Just at first glance (I haven't looked in depth) I notice you're using late binding which could mean that many of the Word enumerations (eg. wdActiveEndAdjustedPageNumber) won't be recognised by Excel.
Either set a (temporary if you like) reference to Word in the VBE's Tools|References dialogue box: (see pic below)


or you'll need to find the value of each (and recognise them in the first place!) and replace them with their numerical value (1 in the case of wdActiveEndAdjustedPageNumber)


The line in your macro:
On Error Resume Next
is going to hide many errors from you, disable it and step through the code with F8 on the keyboard so that you can see which lines are going wrong.
Attached Images
File Type: png 2021-11-20_132834.png (9.7 KB, 17 views)
Reply With Quote
 

Tags
word vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adapting Macropod's Acronym Word VBA Code for Excel Acronym Finder Macro for Microsoft Word mars1886 Word VBA 15 03-30-2022 06:56 AM
@Macropod Macro VBA LINK Fields Relative Paste Special as Image from Excel word bug ggll Word 0 09-18-2021 11:48 PM
Adapting Macropod's Acronym Word VBA Code for Excel Mailmerge line graphs with Macropod's demo gnoles Mail Merge 1 08-30-2019 07:25 AM
Acronym lister and definition checker for Microsoft Word gwez Word VBA 1 06-13-2015 04:00 AM
Adapting a line shape NikkiB Word 4 03-18-2013 08:45 AM

Other Forums: Access Forums

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