C
Charles Kenyon
I have a form for recording a phone message. When done at the same time as
the call the journal date and time are fine. When recording a message from
voice mail, though, I would like the time to be when the message was left
rather than when it was picked up.
I have the following code, which sort of works. The commented out part,
though, does not.
Private Sub cmdOK_click()
Dim olApp As Outlook.Application
Dim objJournal As Outlook.JournalItem
Set olApp = Outlook.Application
Set objJournal = olApp.CreateItem(olJournalItem)
Me.Hide
With objJournal
.Type = "Phone call"
.Subject = txtName.Text & _
" " & txtPhone.Text
.Body = "Call from " & txtName.Text & vbCrLf _
& "Number: " & txtPhone.Text & vbCrLf _
& "==============================" & vbCrLf _
& txtMessage.Text
' If txtDate.Text <> "" Then
' .CreationTime = txtDate.Text
' End If
' If txtTime.Text <> "" Then
' .CreationTime = txtTime.Text
' End If
.Display
End With
End Sub
I guess I don't know what to save the date and time to. CreationTime is
apparently a read-only property. What are the names for the date and time
textboxes on the journal form itself?
TIA
--
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
the call the journal date and time are fine. When recording a message from
voice mail, though, I would like the time to be when the message was left
rather than when it was picked up.
I have the following code, which sort of works. The commented out part,
though, does not.
Private Sub cmdOK_click()
Dim olApp As Outlook.Application
Dim objJournal As Outlook.JournalItem
Set olApp = Outlook.Application
Set objJournal = olApp.CreateItem(olJournalItem)
Me.Hide
With objJournal
.Type = "Phone call"
.Subject = txtName.Text & _
" " & txtPhone.Text
.Body = "Call from " & txtName.Text & vbCrLf _
& "Number: " & txtPhone.Text & vbCrLf _
& "==============================" & vbCrLf _
& txtMessage.Text
' If txtDate.Text <> "" Then
' .CreationTime = txtDate.Text
' End If
' If txtTime.Text <> "" Then
' .CreationTime = txtTime.Text
' End If
.Display
End With
End Sub
I guess I don't know what to save the date and time to. CreationTime is
apparently a read-only property. What are the names for the date and time
textboxes on the journal form itself?
TIA
--
Charles Kenyon
Word New User FAQ & Web Directory: http://addbalance.com/word
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.