Quote Originally Posted by JPDO
Hi,

Following libraries are checked in tools | references

Visual Basic for Applications
Microsoft excel 10.0 object library
OLE Automation
Microsoft Office 10.0 object library
Microsoft Forms 2.0 object library
Microsoft Word 10.0 object library

These is my actual Code:

[VBA]Public Sub load_cheklist()
Dim Filechoosen As String
Dim i As Integer
Dim path As String
Dim WdApp As Application
path = "C:\Documents and Settings\Jean-Pierre Doeraene\Mijn documenten\DATA\EXCEL"
Filechoosen = "C:\Documents and Settings\Jean-Pierre Doeraene\Mijn documenten\DATA\EXCEL\Checklistdata.xls"
Workbooks.Open Filechoosen
Set WdApp = CreateObject("Word.Application")
With WdApp
.Visible = True
wdmodelclfullname = "C:\Documents and Settings\Jean-Pierre Doeraene\Mijn documenten\DATA\word\check list.dot"
.Documents.Open wdmodelclfullname
With .ActiveDocument
.Unprotect
.Bookmarks("text3").Range.Text = CStr(ActiveWorkbook.Worksheets(1).Range("F2").Value)
.Bookmarks("text4").Range.Text = CStr(ActiveWorkbook.Worksheets(1).Range("I2").Value)
If flag = "Y" Then
.FormFields("Check10").CheckBox.Value = True
End If
.FormFields("dropdown1").Result = ActiveWorkbook.Worksheets(1).Range("C2").Value
.Protect Password:="", NoReset:=False, Type:=wdAllowOnlyFormFields
End With
.Quit 'Use if you want to shut down the instance of Word started here
End With
Set WdApp = Nothing
End Sub[/VBA]

On statement set Wdapp = createobject("Word.application") i receive at execution time the error number 13 (Type mismatch)

Please help .
You have not defined flag.
I suggest that you use the code I posted in my previous posting, defining the appropriate value for blnFlag and substituting the appropriate path for the .dot file, as well as including the appropriate Names in the worksheet.

Also add a Set wddoc = Nothing, I forgot to add that.