Some code must be running or intercepting your typing.
Try the command in a new, blank document.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
<Moderator moved from Windows to Mac because Parallels is involved>
I recorded an "Insert Text From File" macro that gets the following error message when I attempt running it: "Compile error: Invalid Outside Procedure".
The VBA code is as follows (with an arrow pointing to the "Sub Macro8()" line, and highlighted in yellow):
Sub Macro8()
'
' Macro8 Macro
'
'
Selection.InsertFile FileName:="Test1.docx", Range:="", ConfirmConversions \_
:=False, Link:=False, Attachment:=False
Please help!
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Some code must be running or intercepting your typing.
Try the command in a new, blank document.
Still not working :(
Since the problem applies to Word for Windows, I suggest starting a new question in the Word for Windows forum and ask about what could cause CurDir to fail.