G
Guest
I've tried the following with limited success. It seems as if there is a
timing issue or something that causes it not to work as desired. Using the
first example, sometimes the file exists but won't open and causes an error
whcih causes the file to be recreated.
On Error GoTo 100
Application.FollowHyperlink "G:\New\" & recordid & ".doc"
Exit Sub
100 DoCmd.OutputTo acOutputTable, "Supporting Document", acFormatHTML,
"G:\New\" & recordid & ".doc", True
This second attempt sees the file sometimes but gives an error that it can
not open it. While it doesn't overwrite the original file, I still need the
file to open if there. Here's the code:
ChkName = "G:\New\ & recordid & ".doc"
If Dir(ChkName,vbNormal) = "" Then
DoCmd.OutputTo acOutputTable, "Supporting Document", acFormatHTML,chkNAme,
True
Else
Application.FollowHyperlink ChkName
End If
What am I missing?
timing issue or something that causes it not to work as desired. Using the
first example, sometimes the file exists but won't open and causes an error
whcih causes the file to be recreated.
On Error GoTo 100
Application.FollowHyperlink "G:\New\" & recordid & ".doc"
Exit Sub
100 DoCmd.OutputTo acOutputTable, "Supporting Document", acFormatHTML,
"G:\New\" & recordid & ".doc", True
This second attempt sees the file sometimes but gives an error that it can
not open it. While it doesn't overwrite the original file, I still need the
file to open if there. Here's the code:
ChkName = "G:\New\ & recordid & ".doc"
If Dir(ChkName,vbNormal) = "" Then
DoCmd.OutputTo acOutputTable, "Supporting Document", acFormatHTML,chkNAme,
True
Else
Application.FollowHyperlink ChkName
End If
What am I missing?