Hello, the problem remains when I sun macro step by step in Local Window.
Excel VBA, error message 4198 when computer is offline
Hello, I have an Excel document with a macro that opens a word-file. The macro runs fine in online mode and in offline mode when Word-document is stored on USB. I get error message 4198 'Command failed' when computer is offline and Word file is saved on desktop/document folder.
Macro code (red/bold text generate 4198)
Set WordApp = CreateObject("word.Application")
WordApp.Documents.Open FileNameTemplate
Your help is highly valued!
Regards Wilhelm
Microsoft 365 and Office | Excel | For business | Windows
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.
12 answers
Sort by: Most helpful
-
Anonymous
2024-05-29T09:14:46+00:00 -
Anonymous
2024-05-29T11:35:58+00:00 Hello, I tested accordingly and found that the directory is equal in offline/online mode.
-
Anonymous
2024-05-29T11:47:55+00:00 I want to add the following:
Initially, I received complaints from co-workers with Windows 11 when they run the macro in question offline.
I have Windows 10. A few months ago, I tested running the macro offline without problems. Recently, I have encountered same issue also on my computer with Windows 10 in offline mode. Perhaps the problem is caused by an update?
I find it strange that it's possible to run macro in offline mode when Word-file is stored on USB drive.
Regards Wilhelm
-
Anonymous
2024-05-29T11:49:51+00:00 I'd suggest you create a support ticket to Microsoft for bugs comes from update.
Please contact your admin/IT department create a support ticket via Microsoft 365 Admin Center> Support> New service request. Support team there will have the correct channel and resources to help you investigate more and find what exactly the reason has caused this situation.
Get support - Microsoft 365 admin | Microsoft Learn
About how to find the admin in your organization, you can refer to How do I find my Office 365 admin