Recent content by Steve Tomalin

  1. S

    Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails

    After having an Outlook nightmare, yesterday, I thought I should explain the significance of where this example VBA macro needs to exist in Outlook's VBA environment, in order for it to work. As a result of a corruption that arose in my OST file, I was unfortunate enough to need to remove and...
  2. S

    Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails

    I bumped into another bug in the above VBA macro today. It turned out that opening anything other than an email would produce the runtime error: run time error 438 - object doesnt support this property or method I discovered the problem was down to the following line: If...
  3. S

    Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails

    I encountered a bug in the above macro, today. Upon opening an unfinished email from either 'Drafts' folder, within the special 'Send Accounts' that I use, the macro would crash with the following error: Run-time error '91' Object variable or With block variable not set Below is the line that...
  4. S

    Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails

    I have just completed a VBA macro, which intercepts all new emails I create or replies I generate from received emails (regardless of whether Reply, Reply-All or Forward has been clicked). The macro conditionally changes the default From Account to a different value and also adds a BCC address...
  5. S

    Can't delete IMAP folder

    If you are using Outlook.com as the IMAP mail server, or a similar service, I would suggest that these two folders are part of the server's functionality and are therefore protected from deletion. I may stand to be corrected, but that would be my guess. Kind regards, Steve
  6. S

    Macro using .SendUsingAccount only works the first time, after starting Outlook

    Hi again Diane, Having dropped your example macro into my Outlook environment, I'm pleased to confirm that it appears to be working great with my IMAP Outlook.com accounts and for successive new emails, replies, reply-alls and forwards! Once I've got my end result working as intended, I'll...
  7. S

    Macro using .SendUsingAccount only works the first time, after starting Outlook

    Many thanks Diane, I'm very grateful to you! I'll play around with the macro you've provided above and see if I can get it working on my machine. As long as it does, I'm fairly confident I can move the rest of my macro code into it and I should then have the finished, working article! Will...
  8. S

    Macro using .SendUsingAccount only works the first time, after starting Outlook

    Hi All, I've put a macro together from examples I found on the web, which uses the Inspectors.NewInspector event to run code when a new item window opens, whether New, Reply, ReplyAll or Forward. Amongst other things, the macro conditionally changes the value in the 'From' drop-down list, using...
  9. S

    SendFromAccount - Problem trying to test existing value in open email

    Hi Again, Perseverance finally paid off! If InStr(LCase(objMail.SendUsingAccount), "fred.bloggs@outlook.com") Then After eventually stumbling on the correct search terms to use in my browser, it led me to another post on the web that shows you how to prompt a user as to whether or not they've...
  10. S

    SendFromAccount - Problem trying to test existing value in open email

    Hi all, Whilst I've had a certain degree of success in using the MailItem.SendUsingAccount property to set the Outlook account through which I want to send an email, I've hit a brick wall in my attempts to use the MailItem.SendUsingAccount property to retreive this value from the current, open...
  11. S

    VBA Macro - Run-time error '424': object required - Help Please

    Hi Diane, Brilliant, it works! Makes me wonder why that '.Class' was in the original example, but I guess it could just have been a typo. Anyway, many thanks indeed for your help, I can now get on with trying to acheive the primary objective! Kind regards, Steve
  12. S

    VBA Macro - Run-time error '424': object required - Help Please

    Hi, I'm afraid I'm no developer, but I'm trying to cobble together a small automation solution in Outlook for myself, using some example code I found on the web (which originated from Sue Mosher), but I'm afraid I've stumbled at the very first hurdle. I want to get Outlook to 'do something'...
Top