Filename length

JohanKotze

Senior Member
OS Version(s)
  1. Windows
Outlook version
Outlook 2019 64-bit
Email Account
IMAP
Operating system::    Window 10 Pro
Outlook version:     Outlook 2021
Email type or host:    Email IMAP

I this filename too long " FW: Rene du Toit slip and fall incident on 11 September 2024 (COM264317/N en A Koegelenberg (PTY) LTD H_As Riebeek Wes Pick n Pay/PA: Klient val )" as I tried to save it but I get an error at line

sPath = StrFolderpath & "\"
Debug.Print sPath & sName
oMail.SaveAs sPath & sName, olMSG
 
You should leave characters like : and / out of filenames .
 
Dianne
Is this the correct way

sName = oMail.Subject
sName = Left(sName, 60)
ReplaceCharsForFileName sName, "-"
 
Similar threads
Thread starter Title Forum Replies Date
D ISOmacro to extract active mail senders name and email, CC, Subject line, and filename of attachments and import them into premade excel spread sheet Outlook VBA and Custom Forms 2
M Search for attachment filename Using Outlook 0
A Auto Insert of filename when selecting 'Remove Attachment' Using Outlook 1
V Difference between attachment displayname and filename Outlook VBA and Custom Forms 6
V "A program has attachment filename open" Message returns Outlook VBA and Custom Forms 4
R 550 maximum allowed line length is 998 octets, got 1012 Using Outlook 7
R Limiting length of saved attachment in VBA Outlook VBA and Custom Forms 2
V Limiting text length in free text field Outlook VBA and Custom Forms 2
L Change length of appointment start time Using Outlook 2
G Change length of phone number in contacts Using Outlook 5
M Increase "Move To" List Length Using Outlook 3
Diane Poremsky Error: 5102. Server. Maximum request length exceeded Using Outlook.com accounts in Outlook 0
A text box length Outlook VBA and Custom Forms 3
C Setting a non-standard default meeting length? Using Outlook 4
P Microsoft.Data.Odbc.OdbcCommand CommandText MAX length. Outlook VBA and Custom Forms 1
D Max. length of MSO MailItem.EntryID Outlook VBA and Custom Forms 6
D Length of the MailItem.EntryID Outlook VBA and Custom Forms 2
T To know new message length Outlook VBA and Custom Forms 3

Similar threads

Back
Top