View Single Post
 
Old 05-02-2023, 06:35 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,166
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

I don't know the aims of your macro but I would remove this line because that doesn't exist in Word.
If Application.CheckAbort = True Then Exit Sub

Then the GetPressedMso only works with ToggleButtons eg Bold. I don't see FilePrint as being a toggle button. As far as I can tell, it will return a Boolean value and can't be Nothing so I get a type error with that line if it points at a togglebutton.

Maybe you should explain what exactly you are trying to do. You won't find many people that like to use SendKeys short of giving up on all the alternatives first.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote