percent symbol In File Path Name - Remove

kwhite100

Board Regular
Joined
Aug 18, 2010
Messages
91
Thank you ahead of time for the help.

I have some vba code that has been working flawlessley on my machine. Essentially, I use vba to create an email and attach a personal signature from outlook. The part of my code that has worked and is now in question is this:

Code:
SigString = Environ("appdata") & "\Microsoft\Signatures\Standard.htm"
              If Dir(SigString, vbNormal) <> "" Then
              Signature = GetBoiler(SigString)
              Else
              Signature = ""
              End If

This finds the file fine on my machine and the email is created nicely. When I go to the folder and select the file, the path is this:

file:///C:/Users/whitekv/AppData/Roaming/Microsoft/Signatures/Standard.htm

I am trying to run the code on a co-workers machine and not getting the signature to attach to the email because when we click on the signature file, the path is this:

file:///C:/Users/Nayran/AppData/Roaming/Microsoft/Signatures/Standard%20.htm

You can see that he has the extra %20 on the end of his filename. How so I remove this or what is the most effective way to make his machine interpret the filepath like mine does? The code does not locate the file because of the %20 added to the end.

Thank you!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hello, I believe your co-worker has saved his e-mail signature with a space at the end, i.e. he has saved it as "Standard " rather than "Standard".

Rename the signature in Outlook with the space removed and your code should work.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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