G
Guest
In code
Sub macros(fileNameMSG, fileNameRTF)
Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myMailItem As Outlook.MailItem
Set myolApp = Outlook.Application
Set myNamespace = myolApp.GetNamespace("MAPI")
Set myMailItem = myNamespace.OpenSharedItem(fileNameMSG)
myMailItem.SaveAs fileNameRTF, olRTF
myMailItem.Close olDiscard
Set myMailItem = myNamespace.OpenSharedItem(fileNameMSG)
myMailItem.Close olDiscard
End Sub
Before second opening file - it is generated error. When I check file - it
is locked. So, what I have to do to unlock file after closing?
Thanks
Sub macros(fileNameMSG, fileNameRTF)
Dim myolApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myMailItem As Outlook.MailItem
Set myolApp = Outlook.Application
Set myNamespace = myolApp.GetNamespace("MAPI")
Set myMailItem = myNamespace.OpenSharedItem(fileNameMSG)
myMailItem.SaveAs fileNameRTF, olRTF
myMailItem.Close olDiscard
Set myMailItem = myNamespace.OpenSharedItem(fileNameMSG)
myMailItem.Close olDiscard
End Sub
Before second opening file - it is generated error. When I check file - it
is locked. So, what I have to do to unlock file after closing?
Thanks