View Single Post
 
Old 09-27-2022, 04:32 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Nicknamednick View Post
I assume, enter my own local path to the .xlsx between the " ".
As coded, the macro looks for a workbook named 'WordList.xlsx' in your Documents folder. You could have it look in whatever folder your document is by changing:
StrWkBkNm = "C:\Users" & Environ("Username") & "\Documents\WordList.xlsx"
to:
StrWkBkNm = ActiveDocument.Path & "\WordList.xlsx"
Otherwise, you could supply the fill path & filename.
Quote:
Originally Posted by Nicknamednick View Post
if the workbook I'm using has a sheet called "Table1 (2)" with the word list, I should swap out for "Sheet1"
Yes.
Quote:
Originally Posted by Nicknamednick View Post
My column is entitled "Column1" so I assume I should change out "column A".
No, that's just a text comment. Regardless of what you change that to, the code will still look in column A. If you want to search a different column, change the column reference in the .Range("A" & i) references.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote