Re: Problem with transport??? Received date not registered on saved message.
From: Jim Schacht (jim_at_bootlogic.com)
Date: 06/03/04
- Next message: Shiv Kotagal: "can't access body property in digitally signed emails"
- Previous message: Jim Schacht: "Re: Problem with transport??? Received date not registered on saved message."
- In reply to: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Next in thread: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Reply: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Jun 2004 18:52:57 -0400
It sure did the trick.
How can I repay you?????
Thanks!
Jim
"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
news:eG7qNzbSEHA.3872@TK2MSFTNGP10.phx.gbl...
> > The problem is that the Category dialog comes up regardless of the
whether
> > the If statement is true or not! What am I doing wrong?
>
> fldDestination is a MAPIFolder object, not a Boolean variable. Try this:
>
> If Not fldDestination Is Nothing Then
> If InStr(1, Item.Subject, strSubject, vbTextCompare) > 0 Then
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Jim Schacht" <jim@bootlogic.com> wrote in message
> news:ujNggubSEHA.3020@TK2MSFTNGP10.phx.gbl...
> > Sue:
> > As usual, you have saved the day!
> >
> > I really appreciate how you help. You give enough information to get me
> > going in the right direction, and let me find the way from there. I
learn
> a
> > lot that way. Thanks a million!
> >
> > I've got my code worked out and it's working great with one small
problem
> > (unrelated to the problem you fixed). I'm thinking that I probably just
> > have my logic wrong, but here's the code (the problem and question will
> > follow):
> > <snip>
> > Private Sub olSentMailItems_ItemAdd(ByVal Item As Object)
> > On Error Resume Next
> > Set objNS = Application.GetNamespace("MAPI")
> > Set objSentMail = objNS.GetDefaultFolder(olFolderSentMail)
> > 'fldDestination is a global variable for the sentitems folder the code
> only
> > executes if there is a value for this variable
> > 'if there is no value for fldDestination the message is ignored.
> > If fldDestination Then
> > If InStr(1, Item.Subject, strSubject, vbTextCompare) Then
> > Item.ShowCategoriesDialog
> > Item.Move fldDestination
> > End If
> > End If
> > Set fldDestination = Nothing
> > strSubject = ""
> > End Sub
> > <end snip>
> >
> >
> > Kind regards,
> > Jim
> >
> >
> >
> >
> >
> > "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
> > news:OfR$x4ZSEHA.1472@TK2MSFTNGP09.phx.gbl...
> > > The method is the same for any folder -- use the
> MAPIFolder.Items.ItemAdd
> > > event. For an example using the Inbox, see
> > > http://www.outlookcode.com/d/code/quarexe.htm
> > >
> > > --
> > > Sue Mosher, Outlook MVP
> > > Author of
> > > Microsoft Outlook Programming - Jumpstart for
> > > Administrators, Power Users, and Developers
> > > http://www.outlookcode.com/jumpstart.aspx
> > >
> > >
> > > "Jim Schacht" <jim@bootlogic.com> wrote in message
> > > news:uIQiJ2ZSEHA.2800@TK2MSFTNGP10.phx.gbl...
> > > > Excellent suggestion. I am sending the original message. I think I
> > went
> > > > down this road many months ago when I first started looking at the
> > project
> > > > and could not figure out how to monitor the sent items. Do you know
> of
> > > any
> > > > examples I could use to get me started?
> > > >
> > > > Best regards,
> > > > Jim
> > > >
> > > >
> > > > "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
> > > > news:%23QKnFaYSEHA.3768@TK2MSFTNGP11.phx.gbl...
> > > > > A better design might be to use DeleteAfterSubmit = False and
> monitor
> > > the
> > > > > Sent Items folder for the actual sent items and move copies of
> those.
> > > They
> > > > > will have acurate date/time stamps that reflect when the item was
> > > > submitted
> > > > > to the workflow (assuming you're sending these items?)
> > >
> > > > >
> > > > >
> > > > > "Jim Schacht" <jim@bootlogic.com> wrote in message
> > > > > news:e70T1QYSEHA.3476@tk2msftngp13.phx.gbl...
> > > > > > Thanks Sue.
> > > > > >
> > > > > > Is there any way I can work around this? It is important for me
> to
> > > have
> > > > a
> > > > > > received time-stamp on these copied items: it is a crucial piece
> of
> > a
> > > > > > workflow design. I've noticed that when I open the item and
then
> > save
> > > > it
> > > > > > without sending, the ReceivedTime is changed to Now. What is
> > > different
> > > > > > about saving a message that way than calling the Save method?
Any
> > > > > > suggestions will be greatly appreciated.
> > > > > >
> > > > > > Jim
> > > > > >
> > > > > > "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in
> message
> > > > > > news:OXdVNLYSEHA.2408@tk2msftngp13.phx.gbl...
> > > > > > > This is normal behavior. An unsent item will have a
ReceivedTime
> > of
> > > > > > > #1/1/4501# which is what Outlook stores when it shows "None"
in
> > the
> > > > UI.
> > > > > > >
> > > > > > > --
> > > > > > > Sue Mosher, Outlook MVP
> > > > > > > Author of
> > > > > > > Microsoft Outlook Programming - Jumpstart for
> > > > > > > Administrators, Power Users, and Developers
> > > > > > > http://www.outlookcode.com/jumpstart.aspx
> > > > > > >
> > > > > > >
> > > > > > > "Jim Schacht" <jim@bootlogic.com> wrote in message
> > > > > > > news:O6SU6YWSEHA.3476@tk2msftngp13.phx.gbl...
> > > > > > > > Greetings,
> > > > > > > >
> > > > > > > > I'm having a heckofa time with the code below. After
> executing
> > > this
> > > > > > code
> > > > > > > in
> > > > > > > > Outlook XP, I expect the copied item (itmNew) to have a
> received
> > > > > > time/date
> > > > > > > > stamp because the Save method was executed. When I debug
the
> > code
> > > I
> > > > > see
> > > > > > > > that the "Saved" flag returns true, but the "ReceivedTime"
> value
> > > > > returns
> > > > > > > > 1/1/4501. When I view the item in the explorer window I
see
> > that
> > > > the
> > > > > > > > received date is "none". From my reading I see that this
date
> > is
> > > > > > > generated
> > > > > > > > by the transport provider.
> > > > > > > >
> > > > > > > > I'm not sure if this is pertinent, but the location the item
> is
> > > > saved
> > > > > to
> > > > > > > is
> > > > > > > > not in the default information store for the profile.
> > > > > > > >
> > > > > > > > This is about to drive me batty so any help will be greatly
> > > > > appreciated!
> > > > > > > >
> > > > > > > > <snip>
> > > > > > > > 'If a folder is picked, the following attributes are given
to
> > the
> > > > > > > outbound
> > > > > > > > message, a copy is made,
> > > > > > > > 'and it is sent.
> > > > > > > > If fldDestination > "" Then
> > > > > > > > With itmCurrent
> > > > > > > > .SentOnBehalfOfName = "Omitted"
> > > > > > > > .DeleteAfterSubmit = True
> > > > > > > > strSubject = .Subject
> > > > > > > > Set itmNew = .Copy
> > > > > > > > .Send
> > > > > > > > End With
> > > > > > > > End If
> > > > > > > >
> > > > > > > > 'The copy is moved to the folder chosen in the folder
> picker
> > > > > dialog
> > > > > > > > Dim propEntryID, propStoreID
> > > > > > > > With itmNew
> > > > > > > > .Save
> > > > > > > > propEntryID = .EntryID
> > > > > > > > .Close (olSave)
> > > > > > > > End With
> > > > > > > > <end snip>
> > > > > > > >
> > > > > > > > Thank you!
> > > > > > > > Jim
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
- Next message: Shiv Kotagal: "can't access body property in digitally signed emails"
- Previous message: Jim Schacht: "Re: Problem with transport??? Received date not registered on saved message."
- In reply to: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Next in thread: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Reply: Sue Mosher [MVP-Outlook]: "Re: Problem with transport??? Received date not registered on saved message."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|