do and don't of naming a file

T

Tuna

Using a button on an Access Form, I try to open a word document it works fine
except if there is a "." in the name I get an error. How can I open a word
document contaning "." in the name. example "QM Section 1 4.0 Tableof
contents"
 
G

Guest

hi,
you don't. sorry.
there are a number of special characters that you should
avoid using in naming conventions. a dot is one of them.
see this site for a list.
http://support.microsoft.com/?id=826763

to solve you immediate problem, i would suggest you change
the dot(.) to an underscore(_). this will get you in the
file.
 
T

Tom Wickerath

Tuna,

The following works for me. Are you enclosing the entire path in quotes?

Tom


Option Compare Database
Option Explicit

Private Sub cmdOpenWordDoc_Click()
On Error GoTo ProcError

Dim oApp As Object
Set oApp = CreateObject("Word.Application")

oApp.Documents.Open "C:\Temp\8.signs.of.true.love.doc"
oApp.Visible = True


ExitProc:
Exit Sub
ProcError:
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in procedure cmdOpenWordDoc_Click..."
Resume ExitProc

End Sub
______________________________________


Using a button on an Access Form, I try to open a word document it works fine
except if there is a "." in the name I get an error. How can I open a word
document contaning "." in the name. example "QM Section 1 4.0 Tableof
contents"
 
Top