0

I need to write a VBA that searches the subject of the highlighted EMail for a specific format of a string (is a reference number of a case). The format is as follows: 3 capital letters / 1 or 2 numbers / 3 or 4 numbers / 2 numbers e.g. ARK/5/1128/19 or RUB/11/548/19. As soon as found to be copied into clipboard as this is a part of a longer procedure that needs to enter this ref no to a field.

This is part of a procedure that archives emails to public folders. This code will assist to find the ref no easier and copy into clipboard so the user can paste it in the search box.

expect that string such as ABC/10/123/19 or DEF/4/1254/18 will be found and copied into cilpboard.

braX
  • 11,506
  • 5
  • 20
  • 33

1 Answers1

0

You can use regular expressions to evaluate the condition, whether the subject contains the string that corresponds to the pattern. Take a look at the following articles for more information on regular expressions:

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45