PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Please HELP....second post.

Reply

Please HELP....second post.

 
Thread Tools Rate Thread
Old 22-09-2003, 02:33 PM   #1
Wendy
Guest
 
Posts: n/a
Default Please HELP....second post.


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




  Reply With Quote
Old 23-09-2003, 02:08 PM   #2
Sue Mosher [MVP]
Guest
 
Posts: n/a
Default Re: Please HELP....second post.

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
>
>
>
>

  Reply With Quote
Old 23-09-2003, 07:29 PM   #3
Wendy
Guest
 
Posts: n/a
Default Re: Please HELP....second post.

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
>
>
>
>



  Reply With Quote
Old 23-09-2003, 08:04 PM   #4
Sue Mosher [MVP]
Guest
 
Posts: n/a
Default Re: Please HELP....second post.

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
> >
> >
> >
> >

>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off