Search results

  1. D.Moore

    Folder view settings by VBA macro

    Thank you! 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!
  2. D.Moore

    Folder view settings by VBA macro

    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() : objItemsUNDELIVERED_itemAdd (null, because the Item is irrelevant for me in this case)...
  3. D.Moore

    Folder view settings by VBA macro

    Dear Diane, 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...
  4. D.Moore

    Folder view settings by VBA macro

    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...
  5. D.Moore

    Folder view settings by VBA macro

    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...
  6. D.Moore

    Folder view settings by VBA macro

    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...
  7. D.Moore

    Folder view settings by VBA macro

    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...
  8. D.Moore

    Folder view settings by VBA macro

    THANK YOU! I was able to work it out based on your help as follows: Dim objFSO Dim objTextFile 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...
  9. D.Moore

    Folder view settings by VBA macro

    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: Sub...
  10. D.Moore

    Folder view settings by VBA macro

    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!!!
  11. D.Moore

    Folder view settings by VBA macro

    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...
  12. D.Moore

    Folder view settings by VBA macro

    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...
  13. D.Moore

    Folder view settings by VBA macro

    Dear Diane, 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...
  14. D.Moore

    Folder view settings by VBA macro

    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...
  15. D.Moore

    Folder view settings by VBA macro

    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...
  16. D.Moore

    Folder view settings by VBA macro

    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...
  17. D.Moore

    Folder view settings by VBA macro

    Hi Diane, I had decided to solve this problem in a different way as there is no reason to waste your time with something, most probably server level anyway. I will merge the 2 exchange mailbox to one, than it will be a standard shared account, so that way, I will be able to access like the...
  18. D.Moore

    Folder view settings by VBA macro

    Thank you! I had been modified the code as you suggested, but the problem is still the same: I am confused, as the shared mailbox is attached, permissions are owner level, name is correct, what the heck can be bad ?
  19. D.Moore

    Folder view settings by VBA macro

    (if you can, may I ask to remove the 2nd image, where the email address is visible ? The forum did not allowed that, for some reason. Not because of you, just because these these days, I would not like to have "floating around" on a public forum. BIG thanks in advance)
  20. D.Moore

    Folder view settings by VBA macro

    Oh, you right, I should think about/realize that. I removed it, AND It caught 2 errors: First time it was (a I already realized is a typo, and corrected it) an object name problem: because, it should be objDeletedItems, instead of "oDeletedItems". I corrected this. Just a question, how the...
Top