#Note This first line is mandatory [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
# Start WinWord (if not already running)
Start-Process -FilePath "chrome.exe"
# Wait for WinWord to open and become active
Start-Sleep -Seconds 3
# Activate the WinWord window (adjust the title if necessary)
$wshell = New-Object -ComObject wscript.shell
#$wshell.AppActivate("Document1 - Word") # Or the actual document title
(New-Object -ComObject "wscript.shell").SendKeys('data:text/html, <title>Notepad</title><body contenteditable style="font-size:18px;line-height:1.6;font-family:sans-serif;">')
(New-Object -ComObject "wscript.shell").SendKeys("{ENTER}")
Start-Sleep -Seconds 1
(New-Object -ComObject "wscript.shell").SendKeys("{TAB}")
for ($k = 1; $k -le 50; $k++) {
for ($i = 1; $i -le 55; $i++) {
$j = [char](65 + $i)
(New-Object -ComObject "wscript.shell").SendKeys("$j")
}
(New-Object -ComObject "wscript.shell").SendKeys("{Enter}")
}