W
wheather girl
Peter please read line below...sorry haven't gotten back to you, life has
just been mad lately.
The 08194 or 09003 is the project code and will also
6 will definately not change to 4, but 6 is possible in the forseeable future.
If so then we would need to
and that willl then be he prefix...but i do have to save these emails not
only in the project folder, but they have to go into a folder under the
project folder of who(the company) the email came from, so for example the
project is 08194, the email gets saved with a number like 08194-R001 and then
it needs to be delegated to the another folder for that company that the
email came from or was sent to...like Onesteel for example, so that email
will go into the project folder of 08194 then to the Onesteel folder as is
came from Onesteel or was sent from us to Onesteel. And so on and so on for
each company that dealings with that project, so Onesteel is to name a few,
we can have about 20 different companies having dealings with that one
project, so need to be able to put them into corresponding folder as
well...is that possible? one thing to get them into the project folder, but
might be another thing to get them into corresponding folders, as need to
assign each email at the time, from outlook regardless wheather it is
incoming of outgoing.
it is the same email or someone has deleted the RE: from the emial....every
email gets assigned a new number.
sent, we then reassign it a new number, the old number still remains in the
subject line for tracking, but it will be given a new number again, and again
and so on, untill that emial stops.
code will always remain the same, just the end bit ie, R or S then the number
0001, or what ever.
would be something like T:09003/documentcontroll/transmittals will have to
check the rest of that. but would also include /Onesteel for the
corresponding folder or /Tonkin just for example sake. and there would be
about 20 of these seperate folders that they would have to go into. not sure
if that is possible...your the expert
That
just been mad lately.
Yes a typoPeter Hibbs said:Wheather Girl,
I have now got the code to save the emails to disk from Outlook, it is
only a couple of lines of code. However, there are a few other things
to consider so I need to ask a few more questions.
Just to recap, you will receive (or send) an email where the Subject
line holds the Project code, plus a -R or -S and then the email
reference number. For example :- 08194-R1234 or 09003-R0002 (I'm
assuming the + sign that crept in on one of the numbers in your last
post was a typo).
The 08194 or 09003 is the project code and will also
at this stage they are always a 5 digit code..not sure if it will change, tobe the name of the folder into which all emails for that project will
be saved. yes
Q1. The two examples you gave have five digit numbers for the project
code followed by a dash, is this ALWAYS the case or is it possible
that, in the foreseeable future, you could have six digit project
codes (or even four digit codes)? I need to extract this value to
create the folder on disk and it is easier if they are always a fixed
length, a bit more code if they can be a variable length.
6 will definately not change to 4, but 6 is possible in the forseeable future.
YesQ2. Are you likely to receive replies from your customers for an email
you sent which you would also want to save to disk. When a reply is
received from a previous email, Outlook adds RE: to the start of the
Subject line. Is this likely to happen?
If so then we would need to
NO, dont strip off that prefix, as I will add my project code ie 08194-R001strip of the prefix before saving the email.
and that willl then be he prefix...but i do have to save these emails not
only in the project folder, but they have to go into a folder under the
project folder of who(the company) the email came from, so for example the
project is 08194, the email gets saved with a number like 08194-R001 and then
it needs to be delegated to the another folder for that company that the
email came from or was sent to...like Onesteel for example, so that email
will go into the project folder of 08194 then to the Onesteel folder as is
came from Onesteel or was sent from us to Onesteel. And so on and so on for
each company that dealings with that project, so Onesteel is to name a few,
we can have about 20 different companies having dealings with that one
project, so need to be able to put them into corresponding folder as
well...is that possible? one thing to get them into the project folder, but
might be another thing to get them into corresponding folders, as need to
assign each email at the time, from outlook regardless wheather it is
incoming of outgoing.
NO wouldn't happen, cause I have to save it with a new number regardless ifQ3. This then raises another question. What happens if you try to save
an email that has already been saved, either by trying to save an
already saved email again accidentally or by saving an email that has
been returned to you as a reply (and had the RE: bit removed). You
have several options here :-
it is the same email or someone has deleted the RE: from the emial....every
email gets assigned a new number.
NO for the same reasons above..wouldn't happen.(a) Overwrite the existing email with the new email (a dangerous
option unless you are sure it is the same email).
NO for same reasons as above...even when we get a reply from the email we(b) Save the email with a different filename, perhaps append an
incrementing number to the end of the filename automatically so, for
example, 08194-R1234.msg would become 08194-R1234+001.msg (or
whatever).
sent, we then reassign it a new number, the old number still remains in the
subject line for tracking, but it will be given a new number again, and again
and so on, untill that emial stops.
NO our system does it automatically, so no it wont be messed up, the project(c) Allow the user to change the filename and then save it to disk
under that new name. An iffy option unless the user knows what they
are doing, they could change the project code part of the filename or
the extension code which would mess the whole thing up somewhat.
code will always remain the same, just the end bit ie, R or S then the number
0001, or what ever.
same as above, it would n't happen(d) Just not allow the email to be saved at all if it has the same
name as an already saved email. once again, same as above.
Let me know what you want the code to do under these circumstances.
ok will have to write it down, cant remember off the top of my head..itQ4. Where abouts on your hard disk are you storing these folders (I
assume that you have some already saved to disk). In other words, what
is the root directory of the project folders, this would be something
like :- C:\Projects\08194 or C:\Projects\09003 I will need that to
locate the project folders. Normally I would not 'hard code' this
pathname (that is enter a pathname into the code) because if you ever
changed it, you would need to rewrite the VBA code to get the project
working again. However, for the moment that will be the easiest
option, maybe when it is working we can add a .ini file on your hard
disk to store it (or perhaps store it in the Registry).
would be something like T:09003/documentcontroll/transmittals will have to
check the rest of that. but would also include /Onesteel for the
corresponding folder or /Tonkin just for example sake. and there would be
about 20 of these seperate folders that they would have to go into. not sure
if that is possible...your the expert
Good Idea, will try to find it.Q5. Is the project code ALWAYS a numerical value. I think it would be
advisable to include some checks in the code to ensure that the email
that the user is trying to save is a valid project email and not some
other email that is not related to any project. If the Subject line of
a valid project email always starts with a five digit number, I could
use that information to validate the email before saving it. I would
think that that would be good enough, it is probably rare to get
normal emails with that sort of Subject line. Yes always numerical.
To answer your other question, yes you can save ANY email in Outlook,
that is received, sent, deleted, etc. You can also highlight a group
of emails together and save them all in one operation.
There is just one other problem (at the moment). I only have Outlook
2003 so I can tell you how to do all this on that version. Outlook
2007, which I believe you are using, is very different. I have been
advised by the Outlook NG that this should work OK in Outlook 2007 but
I will not be able to give you a detailed procedure (which is fairly
complicated) on how to do it. If possible, I would suggest you
initially try this out on a PC that has Outlook 2003 installed.
That
Thanks Peter, youv'e been very helpfulwould give a chance to test it out and familiarise yourself with the
procedure. If not you will need to work out how to do on Outlook 2007
yourself. This Web site shows how to do it with Outlook 2003 :-
http://blogs.techrepublic.com.com/howdoi/?p=146
and this is how in Outlook 2007 :-
http://msdn.microsoft.com/en-us/library/dd229324.aspx
but don't try anything just yet.
Let me know the answers to these questions and I will post back the
procedure for Outlook 2003.