Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select Outlookform programatically

Status
Not open for further replies.

CoCe

MIS
Dec 17, 2002
4
NL
Hello,

I want to select an outlook form named IPM.Note.Testmessage (a custom form) from Excel. Does anyone know the syntaxis to select this specific form?
I'm able te select a standard message an mail this, but not a specific form (see code below)

Sub Inlogcode()
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim cell As Range
Application.ScreenUpdating = False
Set olApp = New Outlook.Application

For Each cell In Sheets("Ledenlijst").Columns("A").Cells.SpecialCells(xlCellTypeConstants)
If cell.Offset(0, 0).Value <> "" Then '//Indien niet leeg
If cell.Offset(0, 0).Value = "YES" Then '//Als yes bij machtiging dan mailen
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.To = cell.Offset(0, 18).Value '//Outlook adres
.CC = cell.Offset(0, 17).Value '//email adres
'/// .Attachments.Add ("d:\bestandsnaam")
'///.Send
.Display
End With
Set olMail = Nothing
End If
End If
Next cell
Set olApp = Nothing
Application.ScreenUpdating = True
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top