v0.6.0 BigUpdate
Example document / build (push) Has been cancelled
Python application / build (push) Has been cancelled

This commit is contained in:
Igor20264
2026-10-20 11:38:06 +03:00
parent daa84f8bce
commit 8223e0ac14
77 changed files with 12158 additions and 117 deletions
+11 -1
View File
@@ -95,10 +95,20 @@ def check_docx_page_fill(path: str) -> tuple[list[PageFillIssue], str]:
"(pip install pywin32) и Microsoft Word."
)
from .word_fix import word_com_apartment
try:
with word_com_apartment():
return _check_docx_page_fill_in_word(path, win32com.client)
except Exception as exc:
return [], f"Проверка вёрстки пропущена: не удалось открыть Word ({exc})."
def _check_docx_page_fill_in_word(path: str, win32com_client):
word = None
doc = None
try:
word = win32com.client.DispatchEx("Word.Application")
word = win32com_client.DispatchEx("Word.Application")
word.Visible = False
word.DisplayAlerts = 0
abs_path = str(path)