Hello all,

I have this Excel file that runs ok on ther Desktop but when launched from the SharePoint site I get this error (Bad file name or Number)

    & vbNewLine & vbNewLine & "Again, Congratulations and keep up the good work!" & vbCrLf & vbCrLf & _
         "" _
        & vbNewLine & vbNewLine & "  OneRx Management-BIG6 Program"
    If Dir(ThisWorkbook.Path & Application.PathSeparator & Sheet1.Range("C" & Pass_Back_Row).Value & ".jpg") <> "" Then
    .attachments.Add ThisWorkbook.Path & Application.PathSeparator & Sheet1.Range("C" & Pass_Back_Row).Value & ".jpg"
    Kill ThisWorkbook.Path & Application.PathSeparator & Sheet1.Range("C" & Pass_Back_Row).Value & ".jpg"
    End If
    If Dir(ThisWorkbook.Path & Application.PathSeparator & Sheet1.Range("C" & Pass_Back_Row).Value & ".jpg") <> "" Then

End If

    .Display
Highlighted code in Yellow

Any suggestions would be great

Regards,

John