F
Fred
Run Time Error 13 Type Mismatch with Word 2003 and Outlook 2007? Does anyone
know what the problem is here? Help gives a variety of Debug Error etc but
nothing I can see? It worked fine the other day!!
At a loss...
Option Explicit
Private Sub UserForm_Initialize()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As MAPIFolder
Dim c As Outlook.ContactItem
Set objOL = New Outlook.Application
Set objNS = objOL.GetNameSpace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFolderContacts)
For Each c In objFolder.Items
ComboBox1.AddItem c.FullName & " - " & c.Email1Address
Next
ComboBox1.ListIndex = 0
Set objOL = Nothing
End Sub
Private Sub cmdInsert_Click()
Selection.TypeText ComboBox1.SelText
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
know what the problem is here? Help gives a variety of Debug Error etc but
nothing I can see? It worked fine the other day!!
At a loss...
Option Explicit
Private Sub UserForm_Initialize()
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As MAPIFolder
Dim c As Outlook.ContactItem
Set objOL = New Outlook.Application
Set objNS = objOL.GetNameSpace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFolderContacts)
For Each c In objFolder.Items
ComboBox1.AddItem c.FullName & " - " & c.Email1Address
Next
ComboBox1.ListIndex = 0
Set objOL = Nothing
End Sub
Private Sub cmdInsert_Click()
Selection.TypeText ComboBox1.SelText
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub