Fix Word VBA Check-In Not Publishing a Major SharePoint Version
Question details
Publish a Word document as a major SharePoint version using a VBA macro.

- 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.
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.
Check the VBA constant and SharePoint versioning settings
Use this approach to verify the macro and library configuration before testing another check-in.
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.
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.
Use this statement in the procedure: ActiveDocument.CheckInWithVersion SaveChanges:=True, Comments:="", MakePublic:=False, VersionType:=wdCheckInMajorVersion.
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.

Publish the major version from SharePoint
Use SharePoint's publishing command if the Word macro continues to create a minor version.
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.

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.




