'Open getFilename For Input As getFileNo
stream.mode = adModeReadWrite
stream.Open
stream.LoadFromFile fileName
Case FileMode.OutputMode
'Open getFilename For Output As getFileNo
stream.mode = admodewrite
stream.Open
stream.SaveToFile
stream.Position = 0
Case FileMode.AppendMode
'Open getFilename For Append As getFileNo
stream.mode = admodewrite
isAppend stream.Open stream.SaveToFile stream.SetEOS = True
Case Else
openFile = False
End Select
If openFile Then
stream.Open
stream.LoadFromFile fileName
If isAppend Then
'https://docs.microsoft.com/ja-jp/office/client-developer/access/desktop-database-reference/seteos-method-ado
stream.SetEOS = True
Else
stream.Position = 0
End If
End If
Exit Function