Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <OutlookEX\OutlookEX.au3>
- Global $oOL = _OL_Open(); Open an Outlook object.
- ConsoleWrite("type $oOL: " & VarGetType($oOL) & @CRLF)
- ConsoleWrite($oOL )
- Global $oItem = _OL_ItemCreate($oOL, 3) ; Creates a blank task. The integer 3 represents a task item.
- Global $text = "Issue" & @crlf & @crlf & "To Do" & @crlf & @crlf & "After" & @crlf & "555"; A string containing three lins of text.
- _OL_ItemModify($oOL, $oItem, Default, "Body=" & $text); Add a custom string to the body of the newly created task.
- Global Const $wdCollapseStart = 1 ; Collapse the range to the starting point
- Global Const $wdWord = 2 ; A word
- Global Const $wdCharacter = 1 ; A character
- Global $oDoc = $oItem.GetInspector.WordEditor ; Get the Microsoft Word Document Object Model
- Global $oRange = $oDoc.Range ; Get the range object
- ;~ $oRange.InsertAfter("This is a test") ; Insert some text
- ;~ $oRange.ListFormat.ApplyBulletDefault ; Move the range start/end to the start of the document
- $oRange.Collapse($wdCollapseStart) ; Move the range start/end to the start of the document
- $oRange.MoveStart(2, 2) ; Move the range start/end to word 1
- $oRange.ListFormat.ApplyBulletDefault ; Move the range start/end to the start of the document
- $oRange.MoveStart(4, 2) ; Move the range start/end to word 1
- $oRange.ListFormat.ApplyBulletDefault ; Move the range start/end to the start of the document
- $oRange.MoveStart(6, 2) ; Move the range start/end to word 1
- $oRange.ListFormat.ApplyBulletDefault ; Move the range start/end to the start of the document
- $oRange.Collapse($wdCollapseStart) ; Move the range start/end to the start of the document
- $oRange.MoveStart($wdWord, 1) ; Move the range start/end to word 2
- $oRange.MoveEnd($wdWord, 1) ; Move the range end two words to the right
- $oRange.MoveEnd($wdCharacter, -1) ; Move the range end one character to the left (so the space isn't included)
- $oRange.Font.Bold = True ; Set the font.underline property for the range
- _OL_Close($oOL)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement