VBA unknown character (MS Outlook)

Lacisnesnon

New Member
Joined
Sep 13, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I know this is for Excel, but MS Outlook uses the same VBA engine?

I have emails with subjects from a specific authority that includes a special character. It shows up as a couple of spaces or a tab in the email subject in Outlook, however, when manually file saving the target email Outlook has already removed this character from the subject.
Email_subject.png

I have a file saver macro module that processes a selected email and saves it to a predetermined location, however, when it extracts the subject from the email it includes this special character which shows up in the error message as a SQUARE (not [] as there are no pixel spaces between the two brackets). See attached images for examples.
Email_subject_VBA_save.png

I have tried processing all special characters that I am able to with no resolution. "#$%()^*&/\:;*?<>+[]." The error still persists.

I guess the only other way is to write code that will process each character in a string until there is an error which then records the error character number in the string and replaces it with something valid. I don't want to have to do this for all emails.

Any ideas would be appreciated.
Thanks in advance
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top