The target is to run after Outlook started right away, addition to that when its run when a new item added.
Understood, so there is no proper way to call the already existing one, but better to create a separate one.
Al clear, BIG THANK YOU!
My problem is, that I don't know how to do it concretely. In details:
My code is in: Private Sub objItemsUNDELIVERED_itemAdd(ByVal Item As Object)
I tried to add this line to the Application_Startup() :
(null, because the Item is irrelevant for me in this case)...
May I ask if there is any way to call/trigger an _itemadd event manually from Application Startup() ?
I know it is called when new item added to the given folder, but e.g. when outlook starts, it does not get called, so I would like to call it manually. Important to say, that the...
I ran into a very strange issue. When Outlook is running, and a MailItem or Report item arrives, _itemAdd event for the folder in ThisOutlookSession triggers properly. But when the message arrives e.g. over the night and I turn on outlook in the morning, rules are executed, BUT the _itemAdd...
Seems it was usefull for some
Seems, it was useful for somebody else too. LOL!
BIG THANK YOU from me too!!
I was able to make it work both this solution and the other one you sent earlier. Hard to tell which one is more easier, but this one is definitively faster.
I also realized, that...
I was surprised too, when I realized, that addition to the body, it also has it in outlook To column. I even tried a "dirty trick" to execute a reply (objVariant.Actions.Item(1).Execute) and trying pick the address up from the to Address field (.Recipients.Item(1).Address), but it only gave me...
The email address is indeed in the message body (left bottom arrow), BUT the reason why I was looking for to catch the original sender TO address, as I was surprised to see, that the original address is available in outlook view pane TO column (top right arrow). So, if outlook has it, I am...
THANK YOU! I was able to work it out based on your help as follows:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Const ForAppending = 8
Set objTextFile = objFSO.OpenTextFile("D:\emails.txt", ForAppending, True)
It is working, BUT I had to realize...
Yeah, you right! :)
May I ask your help on an another question:
I am trying to check each email in a folder, and when it has a specific subject, I need to write the TO recipient to a txt file with append to the first line, and not whole file overwrite.
I was able to get to this point:
Brilliant! Again, you were right, I am an idiot. I assumed, that in case it isn't an exchange address, than SMTPaddress will be Null, but instead, it just kept the last value, without having any error. So, I just added SMTPaddress = "" before Next and the problem solved.
BIG BIG BIG Thank you!!!
While I was searching, I realized, that I could use the "AddressEntry.GetExchangeUser.PrimarySmtpAddress" property, to extract the real email address "masked" by the x500 GAL address. So i was able to make this working code below:
Dim SMTPRecipients As Outlook.Recipients
Dim SMTPaddress As...
Thank you for your kind help, I tried it, and adding some Msgbox to the for cycle for R.address, the following result I got:
/0=S14/ou=Exchange Administrative Group(FYDIBOHF23SPDLT)/cn=2b1789d207b34f67816f092e42702cde-moore@sampledo
So, now it is became obvious that GAL address is making the...
I am still struggling to make the code work based on the article you provided, BUT I was able to make some progress as I could identified why the code in the article did not worked in my case.
At the moment, it seems at this stage, I am only 1 step/problem away from the solution...
Thank you! I did not found this article, I never imagined to search for this title, LOL.
i was happy to see that the part to set the FROM sender is somewhat the way I made it so, that's awesome.
BUT, this part, does not do, what intended for some reason:
' remove your address from reply all...
PROBLEM TWO solved:
I realized a much better solution, than the one mentioned above. I have to use the To property of objItem to retrieve to which email of mine the message had been sent originally to, and set that one as From sender in the newly opened reply message. I am not sure this is the...
PROBLEM ONE half solution: I was able to do some debug, and I had realized, that Reply, ReplyAll and Forward triggers BEFORE openmail, so I am using a global variable and set it to 0 when Reply and Forward, and 1 when ReplyAll and put the own email address removal code into openmail. At this...