Click here to Skip to main content
15,907,326 members
Home / Discussions / C#
   

C#

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 22:36
cofounderChris Maunder12-Jul-09 22:36 
PinnedHow to get an answer to your question Pin
Chris Maunder10-Nov-05 16:31
cofounderChris Maunder10-Nov-05 16:31 
Questiontelegram client api to download video files and/or telegram video link Pin
Tony Germanos6hrs 12mins ago
Tony Germanos6hrs 12mins ago 
GeneralAD Sync Manager - a free tool to easily monitor and manage your AD to Azure AD sync Pin
TheITApprentice21-May-24 18:29
TheITApprentice21-May-24 18:29 
GeneralRe: AD Sync Manager - a free tool to easily monitor and manage your AD to Azure AD sync Pin
OriginalGriff21-May-24 18:30
mveOriginalGriff21-May-24 18:30 
QuestionHow to convert XML to text file Pin
Member 1211605220-May-24 19:37
Member 1211605220-May-24 19:37 
AnswerRe: How to convert XML to text file Pin
Richard Deeming20-May-24 21:32
mveRichard Deeming20-May-24 21:32 
AnswerRe: How to convert XML to text file Pin
trønderen21-May-24 4:43
trønderen21-May-24 4:43 
AnswerRe: How to convert XML to text file Pin
jschell21-May-24 12:27
jschell21-May-24 12:27 
AnswerRe: How to convert XML to text file Pin
OriginalGriff21-May-24 19:02
mveOriginalGriff21-May-24 19:02 
QuestionWhere to hand over the instance of my plugin dll class to another class Pin
AtaChris18-May-24 8:34
AtaChris18-May-24 8:34 
AnswerRe: Where to hand over the instance of my plugin dll class to another class Pin
OriginalGriff18-May-24 20:20
mveOriginalGriff18-May-24 20:20 
GeneralRe: Where to hand over the instance of my plugin dll class to another class Pin
Dave Kreskowiak19-May-24 5:02
mveDave Kreskowiak19-May-24 5:02 
GeneralRe: Where to hand over the instance of my plugin dll class to another class Pin
OriginalGriff19-May-24 5:21
mveOriginalGriff19-May-24 5:21 
GeneralRe: Where to hand over the instance of my plugin dll class to another class Pin
Dave Kreskowiak19-May-24 5:31
mveDave Kreskowiak19-May-24 5:31 
QuestionFind email-enabled public folders exclusively using "Microsoft.Office.Interop.Outlook" Pin
temuco14-May-24 4:25
professionaltemuco14-May-24 4:25 
Is there a way to exclusively identify email-enabled public folders using Microsoft.Office.Interop.Outlook? EWS or PowerShell should not be used. The program should run on the workstation and utilize the installed Outlook.

Once I've found an email-enabled public folder, I should list the emails contained within it.

So far, I'm encountering difficulties. For instance, I have the following method:

C#
// Recursive method for listing the email addresses of email-enabled public folders
static void ListPublicFolders(Outlook.Folder? folder, string indent)
{
    if (folder != null)
    {
        foreach (object obj in folder.Folders)
        {
            if (obj is Outlook.Folder)
            {
                Outlook.Folder? subFolder = obj as Outlook.Folder;

                if (subFolder != null && subFolder.DefaultItemType == Outlook.OlItemType.olMailItem)
                {
                    Outlook.MAPIFolder? parentFolder = subFolder.Parent as Outlook.MAPIFolder;
                    string              parentName   = parentFolder != null ? parentFolder.Name : "Parent folder not found";

                    Console.WriteLine($"{indent}- {subFolder.Name}: {parentName}");

                    if (parentFolder != null)
                    {
                        Marshal.ReleaseComObject(parentFolder);
                    }
                }

                ListPublicFolders(subFolder, indent + "  ");

                if (subFolder != null)
                {
                    Marshal.ReleaseComObject(subFolder);
                }
            }
        }
    }
}

The query

C#
if (subFolder != null && subFolder.DefaultItemType == Outlook.OlItemType.olMailItem)

fails because subFolder.DefaultItemType returns the value Outlook.OlItemType.olPostItem, even though the public folder was set up as an email-enabled folder in Exchange.

Specifically, this is in Microsoft 365. In the Exchange admin center, when creating the folder, I explicitly checked the box for "Email-enabled." This action resulted in two additional options: "Delegation" and "Email properties." In "Email properties," I can specify an alias and a display name. By default, both fields are set to "Orders." Now, I expect the public folder to be email-enabled, with the email address orders@domain.tld.

I don't understand why Outlook is treating the folder incorrectly (I can only create posts and not send emails).

Perhaps someone can help me figure this out.

Thank you and best regards,

René
QuestionI need to convert a the string of a Text box to a Value Pin
glennPattonWork39-May-24 4:19
professionalglennPattonWork39-May-24 4:19 
AnswerRe: I need to convert a the string of a Text box to a Value Pin
Tony Hill9-May-24 4:41
professionalTony Hill9-May-24 4:41 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
Richard Deeming9-May-24 4:43
mveRichard Deeming9-May-24 4:43 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
Tony Hill9-May-24 4:47
professionalTony Hill9-May-24 4:47 
AnswerRe: I need to convert a the string of a Text box to a Value Pin
Richard Deeming9-May-24 4:42
mveRichard Deeming9-May-24 4:42 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
glennPattonWork39-May-24 5:03
professionalglennPattonWork39-May-24 5:03 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
Richard MacCutchan9-May-24 6:02
mveRichard MacCutchan9-May-24 6:02 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
glennPattonWork39-May-24 6:48
professionalglennPattonWork39-May-24 6:48 
GeneralRe: I need to convert a the string of a Text box to a Value Pin
Richard MacCutchan9-May-24 6:56
mveRichard MacCutchan9-May-24 6:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.