SharePoint Document Issues

Fix Word VBA Check-In Not Publishing a Major SharePoint Version

John WilsonJohn Wilson Nov 20, 2026 868 views

Question details

Publish a Word document as a major SharePoint version using a VBA macro.

Fix Word VBA Check-In Not Publishing a Major SharePoint Version
Product
Microsoft Word VBA and SharePoint document libraries
Device & OS
not provided
Scenario
A user wants a Word macro to check in a SharePoint document and publish a major version.
Observed behavior
CheckInWithVersion may increment the minor version instead of publishing a major version.
Before you start

Open the document from its SharePoint library in Word and confirm that you have permission to check it in and publish it. Check the library's versioning settings and whether content approval is required.

Solution 1Recommended

Check the VBA constant and SharePoint versioning settings

Use this approach to verify the macro and library configuration before testing another check-in.

1
Check library versioning

In the SharePoint document library, open Settings > Library settings > Versioning settings. Confirm that versioning is enabled and review the major and minor version and content approval settings.

2
Inspect the macro

In Word, open the VBA editor with Alt+F11 and locate the check-in procedure. Verify that the constant is spelled wdCheckInMajorVersion, and use Option Explicit and Debug > Compile to help catch misspelled identifiers.

3
Set the major version

Use this statement in the procedure: ActiveDocument.CheckInWithVersion SaveChanges:=True, Comments:="", MakePublic:=False, VersionType:=wdCheckInMajorVersion.

4
Run and verify

Run the macro on a checked-out document, then open the file's menu in the SharePoint library and select Version history. Check whether a major version was created and whether approval is still pending.

Check the VBA constant and SharePoint versioning settings
Check-in and approval can differ: If content approval is enabled, a version may need approval before it is visible to readers. If the macro still creates a minor version, use a SharePoint publishing workflow instead.
Free Microsoft Office alternative

Edit Word Documents with WPS Office

WPS Office is a free, lightweight alternative for everyday document editing, with a familiar interface and Microsoft Office format compatibility to help you move existing files. It does not fix Word VBA or SharePoint publishing behavior.

Open and edit Microsoft Word DOC and DOCX filesUse familiar document editing tools in a lightweight suiteWork with Microsoft Excel and PowerPoint formats as well as Word documents
microsoft office alternative - wps office

Frequently Asked Questions

How do I check whether SharePoint created a major version?

In the document library, open the file's three-dot menu and select Version history. Review the version number and any approval status shown.

Why should I use Option Explicit in the Word macro?

Option Explicit requires variables to be declared, making misspelled identifiers easier to catch. Add it at the top of the VBA module, then choose Debug > Compile in the VBA editor.

Where can I enable major and minor versions?

In the SharePoint document library, open Settings > Library settings > Versioning settings and review the document version history options. You may need library owner permissions to change them.

Does a major version automatically become visible to everyone?

Not necessarily. If content approval is enabled, the version may need approval before readers can see it. Check the library's approval settings and the item's status.