Last active
September 22, 2023 21:32
-
-
Save eugrus/6955207fd0add00daa313f1f84d5f8e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Получение доступа к запущенному экземпляру Word | |
$word = [System.Runtime.Interopservices.Marshal]::GetActiveObject("Word.Application") | |
# Вставка текста "Hello, world!" в текущую позицию курсора | |
$word.Selection.TypeText("Hello, world!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import win32com.client | |
# Получение доступа к запущенному экземпляру Word | |
msword = win32com.client.GetActiveObject("Word.Application") | |
# Вставка текста "Hello, world!" в текущую позицию курсора | |
msword.Selection.TypeText("Hello, world!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment