I use the Shell function to zip a file. The directory path to the input file
contains embedded blanks in the name. I can't change the name. So, how can I
hard code this path? eg H:\"My directory"\ doesn't work. Thanks.
Try using Chr(34) in place of your double quotes like this:
strMyPath = "H:\" & Chr(34) & "My directory" & Chr(34) & "\"
Branden Johnson
> I use the Shell function to zip a file. The directory path to the input file
> contains embedded blanks in the name. I can't change the name. So, how can I
> hard code this path? eg H:\"My directory"\ doesn't work. Thanks.
>
> --
> Doug F.
Tom Lake - 15 Dec 2005 04:18 GMT
> Try using Chr(34) in place of your double quotes like this:
>
> strMyPath = "H:\" & Chr(34) & "My directory" & Chr(34) & "\"
The quotes should be around the entire path name rather than just the
directory name
Try
strMyPath = """H:\" & "My directory" & "\"""
Tom Lake
Doug F. - 15 Dec 2005 20:48 GMT
Thanks, I tried quotes around the entire path first, it works fine.

Signature
Doug F.
> > Try using Chr(34) in place of your double quotes like this:
> >
[quoted text clipped - 8 lines]
>
> Tom Lake