PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Please HELP....second post.
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Please HELP....second post.
![]() |
Please HELP....second post. |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I've been tinkering around with this script to get it to post Time and Date
in the notes field of a Task form and I've got it to work (I think the original script came from Sue's wonderful site) except the cursor ends up at the end of the previous line (or at the beginning of the notes field), not at the end of the time/date stamp line. Can someone help? I'm using OL2K with Exchange Svr 5.5 Sub StampTask() Dim objApp As Application Dim objItem As Object Dim objNS As NameSpace Set objApp = CreateObject("Outlook.Application") Set objNS = objApp.GetNamespace("MAPI") Set objItem = objApp.ActiveInspector.CurrentItem If objItem.Class = olTask Then objItem.Body = objItem.Body & vbCrLf & Now() _ End If Set objItem = Nothing Set objNS = Nothing Set objApp = Nothing End Sub |
|
|
|
#2 |
|
Guest
Posts: n/a
|
It's not possible to control the cursor position.
-- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Wendy" <maeven68@nunya.net> wrote in message news:eDeIp4QgDHA.1200@TK2MSFTNGP09.phx.gbl... > I've been tinkering around with this script to get it to post Time and Date > in the notes field of a Task form and I've got it to work (I think the > original script came from Sue's wonderful site) except the cursor ends up at > the end of the previous line (or at the beginning of the notes field), not > at the end of the time/date stamp line. Can someone help? > > I'm using OL2K with Exchange Svr 5.5 > > Sub StampTask() > > Dim objApp As Application > > Dim objItem As Object > > Dim objNS As NameSpace > > > > Set objApp = CreateObject("Outlook.Application") > > Set objNS = objApp.GetNamespace("MAPI") > > Set objItem = objApp.ActiveInspector.CurrentItem > > If objItem.Class = olTask Then > > objItem.Body = objItem.Body & vbCrLf & Now() _ > > > End If > > > > Set objItem = Nothing > > Set objNS = Nothing > > Set objApp = Nothing > > End Sub > > > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Please excuse my ignorance but would it be possible to tell it page down
then end? Or is that 'cursor position'. Sorry but it seems like it's SO CLOSE to working. Wendy "Sue Mosher [MVP]" <suemvp@slipstick.com> wrote in message news:#fY063dgDHA.2084@TK2MSFTNGP10.phx.gbl... It's not possible to control the cursor position. -- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Wendy" <maeven68@nunya.net> wrote in message news:eDeIp4QgDHA.1200@TK2MSFTNGP09.phx.gbl... > I've been tinkering around with this script to get it to post Time and Date > in the notes field of a Task form and I've got it to work (I think the > original script came from Sue's wonderful site) except the cursor ends up at > the end of the previous line (or at the beginning of the notes field), not > at the end of the time/date stamp line. Can someone help? > > I'm using OL2K with Exchange Svr 5.5 > > Sub StampTask() > > Dim objApp As Application > > Dim objItem As Object > > Dim objNS As NameSpace > > > > Set objApp = CreateObject("Outlook.Application") > > Set objNS = objApp.GetNamespace("MAPI") > > Set objItem = objApp.ActiveInspector.CurrentItem > > If objItem.Class = olTask Then > > objItem.Body = objItem.Body & vbCrLf & Now() _ > > > End If > > > > Set objItem = Nothing > > Set objNS = Nothing > > Set objApp = Nothing > > End Sub > > > > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
There's nothing to even put the cursor *into* the notes area, much less move it around. The only possible solution might be to fool around with SendKeys, and that's such a kludge that I can't recommend it.
-- Sue Mosher, Outlook MVP Outlook and Exchange solutions at http://www.slipstick.com Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Wendy" <maeven68@nunya.net> wrote in message news:uw6AUDggDHA.1440@TK2MSFTNGP12.phx.gbl... > Please excuse my ignorance but would it be possible to tell it page down > then end? Or is that 'cursor position'. Sorry but it seems like it's SO > CLOSE to working. > > Wendy > > "Sue Mosher [MVP]" <suemvp@slipstick.com> wrote in message > news:#fY063dgDHA.2084@TK2MSFTNGP10.phx.gbl... > It's not possible to control the cursor position. > > "Wendy" <maeven68@nunya.net> wrote in message > news:eDeIp4QgDHA.1200@TK2MSFTNGP09.phx.gbl... > > I've been tinkering around with this script to get it to post Time and > Date > > in the notes field of a Task form and I've got it to work (I think the > > original script came from Sue's wonderful site) except the cursor ends up > at > > the end of the previous line (or at the beginning of the notes field), not > > at the end of the time/date stamp line. Can someone help? > > > > I'm using OL2K with Exchange Svr 5.5 > > > > Sub StampTask() > > > > Dim objApp As Application > > > > Dim objItem As Object > > > > Dim objNS As NameSpace > > > > > > > > Set objApp = CreateObject("Outlook.Application") > > > > Set objNS = objApp.GetNamespace("MAPI") > > > > Set objItem = objApp.ActiveInspector.CurrentItem > > > > If objItem.Class = olTask Then > > > > objItem.Body = objItem.Body & vbCrLf & Now() _ > > > > > > End If > > > > > > > > Set objItem = Nothing > > > > Set objNS = Nothing > > > > Set objApp = Nothing > > > > End Sub > > > > > > > > > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

