from win32com.client import Dispatch #open Word word = Dispatch('Word.Application') word.Visible = False word = word.Documents.Open(os.path.abspath("Path_to_docx")) #get number of sheets word.Repaginate() num_of_sheets = word.ComputeStatistics(2)