|
-
April 24th, 2002, 10:05 AM
#1
variable vs "text"; How can I put the variable of "xxx" instead of "xxx", if "xxx" must be "xxx", no
Hi,
I'd like to replace "D:\Test\test.txt" with SelectedFile (a variable storing drive, directory, file names). But if I put SelectedFile on the spot where "D:\Test\test.txt" exists, I get an error.
How can I deal with this problem?
'/////////////////////
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
Set w = CreateObject("Word.Application")
SelectedFile = File1.FileName
w.Documents.Open FileName:="d:\Test\test.txt", ConfirmConversions:=False, ReadOnly _
:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|