logo
search
list

Table of Content

File SaveAs VBA code not working in Word forms
Subscription note for this Word issue
Word Save As is bypassing the VBA hook, so the fix is workflow design
Keep form saving simple and controlled
Use WPS Office as a Free Microsoft Office Alternative
Word VBA FileSaveAs Code Does Not Run from Save As FAQs

Why Word VBA FileSaveAs Code Does Not Run from Save As

Posted by Maira Mehtab

calendar

2026-09-17

views

869

likes

4

Word’s built-in Save As dialog bypasses custom FileSaveAs VBA in this case, so username checks and form-save restrictions do not fire.

File SaveAs VBA code not working in Word forms

This issue appears in Word documents that use ActiveX-based forms and a custom Save Form button. That button validates the form, saves the finished document to the user’s Downloads folder, and applies a filename built from entered data.

  • The document is protected so users can only fill in form fields.
  • A save event already warns users not to use the normal save command.
  • The remaining gap is File > Save As, which users can still open from Word’s menu.

Code placed in FileSaveAs does not run when the user opens Save As from the File menu.

Because the macro does not fire, checks such as Environ("username") never get a chance to block unapproved users.

Word opens its standard Save As dialog directly instead of handing control to that VBA routine.

  • Open the protected Word form.
  • Use the in-document Save Form button and confirm that validation and naming work as expected.
  • Then choose File > Save As from the Word ribbon menu.
  • If your message box or blocking logic in FileSaveAs never appears and Word shows the normal Save As dialog, the built-in command is bypassing your macro in this setup.

That means the requested restriction is not supported through this macro alone. The practical answer is not that the username test is wrong, but that the menu command does not call the VBA code you expected.

Subscription note for this Word issue

Why File SaveAs VBA code is not working in Word instructions and verification workflow
Subscription note for this Word issue in Word.

Product version in scope

The source specifically references Microsoft Office 365 for Word. No plan tier, price, or add-on cost is provided in the source material.

What can be concluded

This problem is described as a behavior limitation, not as a licensing restriction. no documented behavior establishes any pricing-based feature that would enable or disable interception of File > Save As.

Word Save As is bypassing the VBA hook, so the fix is workflow design

For this Office 365 form setup, the evidence points to a hard limitation: File > Save As does not trigger the expected FileSaveAs code. Keep the custom Save Form process for validation and naming, and do not depend on that menu command for user-based enforcement.

Keep form saving simple and controlled

Cleaner document workflow

When Word’s built-in Save As path will not honor your VBA restriction, a simpler editor workflow can reduce confusion and keep completed forms organized with manual Save As control.

Use WPS Office as a Free Microsoft Office Alternative

WPS Writer logo
WPS Presentation logo
WPS Spreadsheets logo
WPS PDF logo
Use Word, Excel, and PPT for FREE

WPS Office cannot intercept Microsoft Word’s Save As command or guarantee compatibility with Word VBA event code. Complete that Microsoft-specific step in the original Microsoft application or account.

WPS Office free alternative for word vba filesaveas code does not run from save as
Use WPS Office for compatible local office files while the Microsoft-specific issue is resolved.

For local document work around this topic, Writer, Spreadsheets, Presentation, PDF tools, and WPS AI provide a lightweight workspace with a familiar interface. Test macros, add-ins, protected files, and cloud-only integrations before replacing a critical workflow.

100% secure

Word VBA FileSaveAs Code Does Not Run from Save As FAQs

Can I allow Save As only for approved Windows usernames by using Environ("username")?

Not through this File > Save As path alone. Your username test can work only if Word actually runs the VBA code, and the documented behavior shows that this menu action does not trigger FileSaveAs here.

What is the best way to verify that Word is bypassing my custom save logic?

Put a simple message box at the start of your FileSaveAs routine, then open the document and choose File > Save As. If Word shows the standard Save As dialog and no message box appears, the macro is not being called from that command.

Why does Environ("username") not help in this Save As scenario?

The username test can only work if the VBA routine runs first. Here, the Save As menu path bypasses that code, so the username check never executes.

What should be verified after keeping the custom Save Form button?

Test the exact button flow: complete the fields, click Save Form , confirm validation runs, then check that the file is saved to Downloads with the required generated name.

Maira Mehtab

I'm Maira, experienced in using office suite tools and technology to support professional tasks. My regular use of Office software has helped me develop strong command over these tools, especially in drafting legal instruments and helpful content.