How to check if an Outlook Email is in Read-Only mode ?
How to check if an Outlook Email is in Read-Only mode ?
|
Jun Wei Ng
Guest
|
Hi There,
I have an Outlook Email contains an email attachment.
When I open the email attachment, the email can be opened but it is in read-only mode.
Is there any way I can check is the email in read-only mode programmatically ?
Outlook is unlike Word, in word object, we can still use the following code to check whether the document is in read-only mode or not:
Dim activeDoc As Word.Document = appWord.ActiveDocument
If activeDoc.ReadOnly = True Then
// continue the process
End If
Best Regards,
Jun Wei |
|
Posted 09 Dec, 2019 05:09:18
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
|
Posted 09 Dec, 2019 06:54:12
|
|
Top
|
|
Jun Wei Ng
Guest
|
Hi Andrei,
Appreciate the solution that you provided but I dont think it can be used to do the checking as it is not very accurate.
Is there any proper way like using Word Object to check the opened email attachment is in read only mode ?
My scenario as below:
An email contains an email attachment, when I open the email attachment, it stated that the email attachment is in read only mode. When I do certain actions (I integrated my own function with Outlook), exception occurred saying that 'You don't have appropriate permission to perform this operation.'
It throws exception when go through this line:
Outlook.MailItem.SaveAs(path, Outlook.OlSaveAsType)
Kindly assist.
Best Regards,
Jun Wei |
|
Posted 09 Dec, 2019 22:05:18
|
|
Top
|
|
Jun Wei Ng
Guest
|
Hi Andrei,
Any update on this issue ?
Best Regards,
Jun Wei |
|
Posted 11 Dec, 2019 23:36:09
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hello Jun,
Sorry for misunderstanding.
Jun Wei Ng writes:
When I open the email attachment, the email can be opened but it is in read-only mode.
Could you please explain this? I don't understand "read-only mode". Is this mode in any way different from what you get if you open a received email by double-clicking it?
Andrei Smolin
Add-in Express Team Leader |
|
Posted 12 Dec, 2019 04:06:47
|
|
Top
|
|
Jun Wei Ng
Guest
|
Hi Andrei,
My scenario as below:
An email contains an email attachment, when you double click to open that email attachment, at the top you will see '[The Subject of the e-mail attachment](Read-Only)'.
This is what I meant.
When I use my own function integrated with Outlook, I hit the 'You don't have appropriate permission to perform this operation.' exception.
Best Regards,
Jun Wei |
|
Posted 12 Dec, 2019 20:41:57
|
|
Top
|
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
|
Posted 13 Dec, 2019 05:53:18
|
|
Top
|
|