Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to count docx pages python

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)
Comment

PREVIOUS NEXT
Code Example
Python :: open image from link python 
Python :: python delete all files in directory 
Python :: run django app locally 
Python :: install python 3.9 linux 
Python :: tensorflow load h5 model 
Python :: label size matplotlib 
Python :: python cv2 screen capture 
Python :: python get newest file in directory 
Python :: geopandas set crs 
Python :: change directory in python os 
Python :: how to read docx file in python 
Python :: django create app command 
Python :: python check file format 
Python :: python iterate dictionary in reverse order 
Python :: python system year 
Python :: django today date in template 
Python :: python get stock data 
Python :: Find the Runner Up Score solution in python3 
Python :: check corently installed epython version 
Python :: python pi value 
Python :: python sleep milliseconds 
Python :: flask minimal install 
Python :: make length string in pandas 
Python :: get all the keys in a dictionary python 
Python :: convert numpy array to dataframe 
Python :: python list of dates between 
Python :: python read gzipped file 
Python :: how to play music on pygame 
Python :: python console animation 
Python :: age in days to age in years 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =