is any ms access or asp/vb guru online rite now???
Re: :D need lil assistance
yes . i am here.
Re:
need lil assistance
k here it is
I want to view an attched word document. But I keep getting this msg that Type mismatch.file is being attached but i can’t view it for some reason.
To attach file!
Private Sub SelectFile_Click()
Dim OFN As OPENFILENAME
On Error GoTo Err_SelectFile_Click
’ Set options for dialog box.
With OFN
.lpstrTitle = “Select Documents”
If Not IsNull(
[QuoteWorkout]
) Then .lpstrFile =
[QuoteWorkout]
.flags = &H1804 ’ OFN_FileMustExist + OFN_PathMustExist + OFN_HideReadOnly
.lpstrFilter = MakeFilterString(“Word files (.doc)", ".doc”, _
“All files (.)”, “.”)
End With
If OpenDialog(OFN) Then
[QuoteWorkout]
= OFN.lpstrFile
’ [imgPicture].Picture = [PicFile]
’ SysCmd acSysCmdSetStatus, “Afbeelding: '” & [PicFile] & “'.”
End If
Exit Sub
Err_SelectFile_Click:
MsgBox Err.Description, vbExclamation
End Sub
To View File
Private Sub ViewCalc_Click()
On Error GoTo Err_ViewCalc
Dim XL As Object
Set XL = CreateObject(“Word.Application”)
If IsNull(Me.QuoteWorkout) Then
MsgBox “You haven’t Attached a Calculation File”, , “Error”
Else
With XL.Application
.Visible = True
.documents.Open Me.QuoteWorkout
End With
Set XL = Nothing
End If
Exit_ViewCalc_Click:
Exit Sub
Err_ViewCalc:
MsgBox Err.Description
Resume Exit_ViewCalc_Click
End Sub
I hope I am making sense, I just need lil help in correcting the viewing script.
Re: :D need lil assistance
can you post the exact error message with error code.
Re:
need lil assistance
it opens the MSword and then give me an error box data type mismatch!