Hi Crystal Guru
Sorry but I am a newbie to Crystal 9 and need a bit of help. The answer is probably dead easy but I would appreciate your advice nonetheless.
Okay I have access to my database and can select columns from the table and place into the report in one horizontal line. Now if I run...
Thanks for that, but can I just ask you a quick question? Does
If DateDiff("d", olitem.ReceivedTime, Now) > 1 _
mean 'everything that was received older than today'? And by today does that mean every email older than 00:00 hours this morning or the last 24 hour period since the macro was...
However can anyone tell me how to put in two conditions such as:
For Each olitem In fldDBA.Items
If DateDiff("d", olitem.ReceivedTime, Now) > 1 Then olitem.Delete
ElseIf DateDiff("d", olitem.CreationTime, Now) > 1 Then olitem.Delete
Next
End If
Yes I have just tested it by changing:
If DateDiff("d", olitem.CreationTime, Now) > 2 Then olitem.Delete
to read:
If DateDiff("d", olitem.ReceivedTime, Now) > 2 Then olitem.Delete
And it works now. :) Thanks for all the advice.
Just a thought could it be the "creation date" clause:
(i.e. If DateDiff("d", olitem.CreationTime, Now) > 2 Then olitem.Delete)
because I am cutting and pasting emails from another folder? Is it possible to change this to the emails received date?
Arrgh! Thanks for your help. This is really annoying me now. :/ Okay the following code CAN see the folder because if I rename the last forlder to say "DBAi" from "DBA" it throws up an error saying it cannot locate the folder. So it must be seeing the folder. I then tried to debug it using the...
Well I am totally confused here as what Gerry mentions above does work to remove emails older than 2 days from my Drafts folder however when I am trying to explicitly mention the path to my folder in my "Inbox" the query runs but does not delete. Grr! What am I doing wrong? Could it be anything...
Hi Tony/Gerry
Okay the following code runs however it is not removing the old emails. For simlicity I have tried to set it up in my mailbox, inbox, and dbadatabaseinfo folder first. But it doesnt appear to want to play ball. Grr! The path to the folder is: "Mailbox - Poole, David" > "Inbox" >...
So far I have got:
Public Sub EmptyDBADatabaseInfoEmailFolder()
Dim nsSession As NameSpace
Dim fldInbox As Outlook.MAPIFolder
Dim fldDBADatabaseInfo As MAPIFolder
Dim olitem As Object
Set nsSession = ThisOutlookSession.Session
Set...
Hi Gerry
Sorry I the above does work for the Drafts folder, however I was only using that one to test against as I actually want to apply the macro to the following mailbox and subfolder:
-SystemOperationsMailbox
-Inbox
-Administrators
-DBA Database Info
However if I substitute the...
Hello Gurus
So far I have created a macro (code below) that when run deletes emails directly from the 'Drafts' folder, however I want to add the condition that it only deletes emails 'older than 2 days old'. Can anyone advise on how I can add this into my macro below.
All help greatly...
Thanks Lewisp. Is it possible to create a triggered button that executes the appropriate pl/sql based on which radio button is highlighted? So far I have:
BEGIN
IF :RG_1.R_1=1
THEN
select (sysdate +1) into :text_1 from dual;
select 'Tomorrows Date' into text_2 from dual...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.