Word 2003 macro in Word 2016 "Run-time error '5'"
We have two macros that were written for Word 2003, but now have to upgrade to Word 2016 on a new Remote Desktop server. The macro shows up under the "Add-ins" tab but when we click it, we see the following error:
Microsoft Visual Basic
Run-time error '5':
Invalid procedure call or argument
Changing the Trust Center macro settings has no effect.
Is it possible to convert these macros to work in Word 2016? If so, how? If not, what are the next steps?
It does indeed crash at the line containing the Mid().
If I delete the subroutine, the macro will run (but of course it won't work properly).
I don't have any experience of macros or VBA. Could you give me a suggestion how to amend this code? Many thanks.
Fantastic, the macro now runs! Also made the same change in the larger of the two. Thanks very much! We are testing it now. Will post outcome in due course.
Yes, this works now, There is a different problem regarding the behaviour of the macro, but that's a different story. Will ask another question if necessary. Thanks again!
this error could be machine specified and probably inherited from Word 2003?