I have looked at these and similar approaches, but unfortunately they do not work for me for a number of reasons.
I do not have registry edit permissions, which is a pity in this context.
I might be able to replace the default signature files with my own files, but I am reluctant to do that...
My administrator at work runs a process three or four times a day which deletes my custom signature from the list of signatures I can use in Outlook. I have Outlook VBA code which extracts from a zip file my own signtaure block (it looks identical to the default but has formatting attributes I...
The something simple was to close and restart Outlook!
Now it all seems to be working as it should. I shall keep an eye on it for the next few days to be sure.
I find it hard to work out quite what changes you are advising me to make, so here is the full amended code - which produces exactly the same result - nothing changes!
If Item.BodyFormat = olFormatPlain Then
b = Item.body
OldText = "Text to remove."
NewText = ""
b = Replace(b, OldText...
I am not sure I understand that.
If I write this:
If Item.BodyFormat = olFormatPlain Then
b = lcase(Item.Body)
OldText = Replace(Item.body, "Text to Remove" & vbCrLf, "")
NewText = ""
Item.body = b
End If
which is the code currently not working as it should, where would I add b = Item.body?
I cannot see anything unique at all. Having checked, the string I am looking for is not duplicated, although the first two words do form part of a different string. I would have thought that would not count.
You are right, the second half of the macro is not working on plain text.
Much to my surprise I managed to get this to work - sort of.
I added in declarations (is that the right name?):
Dim b$
Dim OldText$
Dim NewText$
before the first line of code in your last message, without which the code was not working.
Most incoming HTML e-mails now arrive with the text...
I tried forwarding an HTML email to myself with the code switched on and off and now that I look at it more closely you are absolutely right. All the HTML code is stripped out.
So ideally what I would need would be code that tests to see if an incoming e-mail is HTML or not. If not, the...
I am getting there! That works, and it also works if I add in & vbcrlf. The trouble is that I now see that there are three carriage returns I would like to get rid of. In my naivety I tried adding in two more & vbcrlf and, as I half suspected, that did less than nothing at all - in fact the...
I have managed to get rid of the original error (I am not quite sure how), and the message box did appear as you said it would. When I replaced it, however, I got a syntax error. No doubt I read your instructions wrongly. What I did was to replace the whole of
MsgBox "Message subject: " &...
When I pasted your code into the ThisOutlookSession and closed Outlook, on exiting I got a compile error: "Invalid attribute in Sub or Function" at the line "Private WithEvents objItems As Outlook.Items". Obviously the same thing happened when I restarted Outlook.
I think I should use the...
Thank you for this, but having pored over it all for some time I am afraid I cannot make it work. I am much too much of a novice I suspect. Would it be possible for you to set out the full code here?
My incoming e-mails are all marked with an additional line of text at the start. I have been trying to work out how to delete that text automatically (either by using a rule plus a script or in some other automatic way) and I cannot find anything to show me exactly what I want to do.
I think...
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.