> When I use Dialogs(wdDialogFileOpen).Name, a name with space characters in it
> is returned in quotes. A single-string name is returned without quotes.
[quoted text clipped - 4 lines]
>
> Is that about as good a way as any?
Hmmmm, not sure what you're trying to accomplish? My best guess is that you want to
remove all quote characters? If so,
TheFileName = Replace(.Name, """", "")
oughta do.

Signature
.NET: It's About Trust!
http://vfred.mvps.org
Bear - 25 Sep 2007 20:16 GMT
Karl:
That's exactly what I'm trying to do, and you've suggested a neat way to do
it.
Thanks.
Bear

Signature
Windows XP, Word 2000
> When I use Dialogs(wdDialogFileOpen).Name, a name with space
> characters in it is returned in quotes. A single-string name is
[quoted text clipped - 7 lines]
>
> Bear
The statement
strFN = Replace(strFN, """", "")
will return the result without quotes regardless of whether it had them.
The only caveat is that the Replace function didn't exist in Word 97 VBA. If
that's a problem, there are substitutes available on the Web, such as
http://www.vbforums.com/archive/index.php/t-243433.html.

Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
Bear - 25 Sep 2007 21:48 GMT
Jay:
Thanks! For my purposes Word 2000 is the earliest I have to worry about, so
this is a dandy solution.
Bear

Signature
Windows XP, Word 2000
> > When I use Dialogs(wdDialogFileOpen).Name, a name with space
> > characters in it is returned in quotes. A single-string name is
[quoted text clipped - 17 lines]
> that's a problem, there are substitutes available on the Web, such as
> http://www.vbforums.com/archive/index.php/t-243433.html.