S
slickdock
I store all text files that I use for TransferText commands into a folder
called c:\documents and settings\all users\application data\MyTxtFiles. I
want to be able to sometimes change that path, so I put that path in a
textbox control that is bound to my switchboard form, whose source is the
table that contains the myTxtFiles field.
I need to refer to that field [forms!][switchboard]![MyTxtPath] throughout
my code in 4 basic ways:
1. Set wdActiveDoc = wd.Documents.Open( "…MyTxtPath\merge_ad.docâ€â€¦
2. wd.ActiveDocument.SaveAs "…MyTxtPath\merged_ad.doc"
3. If .RecentFiles(y).Path = MyTxtPath Then
If .RecentFiles(y).Name = "merge_ad.doc" Then
.RecentFiles(y).Delete
End If
4. Dim Destination As String
Destination = "MyTxtPath\merge_ad.doc"
Can anyone help me with the proper way to handle this? I don’t want to “hard
code†it by typing the actual path string throughout my code, because that
path may change at times.
Thanks in advance.
called c:\documents and settings\all users\application data\MyTxtFiles. I
want to be able to sometimes change that path, so I put that path in a
textbox control that is bound to my switchboard form, whose source is the
table that contains the myTxtFiles field.
I need to refer to that field [forms!][switchboard]![MyTxtPath] throughout
my code in 4 basic ways:
1. Set wdActiveDoc = wd.Documents.Open( "…MyTxtPath\merge_ad.docâ€â€¦
2. wd.ActiveDocument.SaveAs "…MyTxtPath\merged_ad.doc"
3. If .RecentFiles(y).Path = MyTxtPath Then
If .RecentFiles(y).Name = "merge_ad.doc" Then
.RecentFiles(y).Delete
End If
4. Dim Destination As String
Destination = "MyTxtPath\merge_ad.doc"
Can anyone help me with the proper way to handle this? I don’t want to “hard
code†it by typing the actual path string throughout my code, because that
path may change at times.
Thanks in advance.