How to export plan comments to excel ?

%3CLINGO-SUB%20id%3D%22lingo-sub-1058349%22%20slang%3D%22en-US%22%3EHow%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1058349%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20exporting%20a%20plan%20to%20excel%2C%20comments%20for%20each%20task%20are%20not%20included.%20Is%20there%20a%20plan%20to%20include%20comments%20in%20export%20as%20well%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt'll%20be%20helpful%20to%20be%20able%20to%20get%20each%20comment%20as%20an%20additional%20column%20for%20every%20task%20row%20to%20get%20a%20full%20view%20in%20excel.%20This%20helps%20in%20easy%20backup%20for%20the%20discussions%20against%20each%20task%20and%20not%20just%20get%20a%20plan%20notes.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1058759%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1058759%22%20slang%3D%22en-US%22%3EI'm%20not%20aware%20of%20this%20option%20coming%20to%20the%20native%20export%20feature%20in%20Planner%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1059658%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1059658%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F484259%22%20target%3D%22_blank%22%3E%40itsanshulhere%3C%2FA%3E%26nbsp%3Byou%20need%20to%20use%20third-party%20apps%20to%20export%20the%20complete%20meta%20details%20to%20Excel%20and%20preserve%20it.%20Additionally%2C%20you%20can%20also%20configure%20the%20schedule%20run%20to%20export%20the%20data%20to%20excel%20for%20back%20up.%20Let%20me%20know%20if%20you%20need%20to%20know%20more%20about%20the%20app.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1173056%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1173056%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1547%22%20target%3D%22_blank%22%3E%40Santhosh%20Balakrishnan%3C%2FA%3Ewhat%203rd-party%20applications%20have%20you%20used%20to%20export%20the%20full%20meta%20details%20to%20Excel%3F%20I%20have%20a%20user%20requesting%20this%20use%20case%20and%20would%20love%20to%20be%20able%20to%20give%20a%20solution.%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1175334%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1175334%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F381743%22%20target%3D%22_blank%22%3E%40Sonnumber5%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fapps4.pro%2Fplanner-manager.aspx%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fapps4.pro%2Fplanner-manager.aspx%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1458720%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20export%20plan%20comments%20to%20excel%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1458720%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F484259%22%20target%3D%22_blank%22%3E%40itsanshulhere%3C%2FA%3E%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20use%20an%20alternative%20way%20using%20the%20fact%20that%20I%20receive%20an%20e-mail%20when%20a%20new%20comment%20is%20posted.%20Although%20maybe%20there%20are%20better%20options%2C%20this%20works%20fine%20for%20me.%3C%2FP%3E%3CP%3EI%20have%20a%20Folder%20in%20outlook%20where%20the%20Planner%20e-mails%20are%20moved%20automatically%20that%20is%20called%20%22Planner%20e-mails%22%2C%20but%20it%20can%20work%20with%20the%20main%20folder%20if%20needed.%20When%20an%20e-mail%20is%20added%20to%20this%20folder%20the%20following%20code%20is%20executed%2C%20where%20the%20Title%2C%20Date%20and%20Body%20text%20is%20passed%20to%20another%20macro%20which%20open%20an%20Excel%20file%20and%20to%20paste%20the%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EPrivate%20Sub%20Application_NewMailEx(ByVal%20EntryIDCollection%20As%20String)%0A%20%20Dim%20outlookApp%20As%20Outlook.Application%0A%20%20Dim%20objectNS%20As%20Outlook.NameSpace%0A%20%20Dim%20inboxItems%20As%20Outlook.Items%0A%20%20Dim%20item%20As%20Object%0A%20%20Dim%20myTitle%20As%20Outlook.MailItem%0A%20%20Dim%20myDate%2C%20myBody%20%20As%20String%0A%20%20Dim%20DataArray(3)%20As%20Variant%0A%0A%20%20Set%20outlookApp%20%3D%20Outlook.Application%0A%20%20Set%20objectNS%20%3D%20outlookApp.GetNamespace(%22MAPI%22)%0A%20%20Set%20inboxItems%20%3D%20objectNS.GetDefaultFolder(olFolderInbox).Folders(%22Planner%20e-mails%22).Items%0A%0ASet%20item%20%3D%20objectNS.GetItemFromID(EntryIDCollection)%0A%0AIf%20TypeName(item)%20%3D%20%22MailItem%22%20Then%0A%20%20%20%20If%20InStr(item.Subject%2C%20%22RE%3A%20Comments%20on%20task%20%22)%20%26lt%3B%26gt%3B%200%20Then%0A%20%20%20%20%20%20%20%20Set%20myTitle%20%3D%20item%0A%20%20%20%20%20%20%20%20myDate%20%3D%20item.CreationTime%0A%20%20%20%20%20%20%20%20myBody%20%3D%20item.Body%0A%20%20%20%20%20%20%20%20DataArray(1)%20%3D%20myTitle%0A%20%20%20%20%20%20%20%20DataArray(2)%20%3D%20myDate%0A%20%20%20%20%20%20%20%20DataArray(3)%20%3D%20myBody%0A%20%20%20%20%20%20%20%20OpenExcelFileFromOutlookVBA%20(DataArray)%0A%20%20%20%20%0A%20%20%20%20End%20If%0A%20%20%20%20'Result%20%3D%20MsgBox(MessageInfo%2C%20vbOKOnly%2C%20%22New%20Message%20Received%22)%0AEnd%20If%0A%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20macro%20to%20open%20the%20Excel%20file%20is%20the%20following.%20Then%20in%20that%20Excel%20file%20there%20is%20a%20macro%20%22Module3.InsertOutlookComments%22%20to%20paste%20the%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ESub%20OpenExcelFileFromOutlookVBA(DataArray)%0A%0A'To%20make%20sure%20the%20excel%20application%20was%20available%20from%20within%20outlook%20I%20had%20to%20go%20into%20the%20menus%20and%20make%20sure%20the%20reference%20was%20available.%0A'tools%26gt%3Breferences%26gt%3B'Microsoft%20Excel%2016.0%20Obecjt%20Library'%20(or%20similar)%0A%20%20%20%20%0A%20%20%20%20'%20Excel%20Application%2C%20workbook%2C%20and%20sheet%20object%0A%20%20%20%20Dim%20xlApp%20As%20Excel.Application%0A%20%20%20%20Dim%20xlBook%20As%20Excel.Workbook%0A%20%20%20%20Dim%20xlSheet%20As%20Object%0A%20%20%20%20%0A%20%20%20%20'%20Filename%0A%20%20%20%20Dim%20fileDoesExist%20As%20Boolean%0A%20%20%20%20Dim%20FileName%20As%20String%0A%20%20%20%20%0A%20%20%20%20'%20Create%20Excel%20Application%0A%20%20%20%20Set%20xlApp%20%3D%20CreateObject(%22Excel.Application%22)%0A%20%20%20%20xlApp.Visible%20%3D%20False%0A%20%20%20%20%0A%20%20%20%20Set%20xlBook%20%3D%20xlApp.Workbooks.Open(%22S%3A%5CExcel%20file.xlsm%22)%0A%20%20%20%20Set%20xlSheet%20%3D%20xlBook.Sheets(1)%0A%0A%20%20%20%20%0A%20%20%20%20'%20Do%20stuff%20with%20Excel%20workbook%0A%20%20%20%20With%20xlApp%0A%20%20%20%20%20%20%20%20With%20xlBook%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20Dim%20Comment%20As%20String%0A%20%20%20%20%20%20%20%20%20%20%20%20Dim%20CommentDate%20As%20Date%0A%20%20%20%20%20%20%20%20%20%20%20%20Dim%20Project%20As%20String%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20CommentDate%20%3D%20DataArray(2)%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20If%20DateDiff(%22n%22%2C%20CommentDate%2C%20Now())%20%26lt%3B%2010%20Then%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Comment%20%3D%20Left(DataArray(3)%2C%2020)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20Project%20%3D%20DataArray(1)%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20xlBook.Application.Run%20%22Module3.InsertOutlookComments%22%2C%20DataArray%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20End%20If%0A%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20End%20With%0A%20%20%20%20End%20With%0A%20%20%20%20xlBook.Close%20SaveChanges%3A%3DTrue%0A%20%20%20%20xlApp.Quit%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

When exporting a plan to excel, comments for each task are not included. Is there a plan to include comments in export as well ? 

 

It'll be helpful to be able to get each comment as an additional column for every task row to get a full view in excel. This helps in easy backup for the discussions against each task and not just get a plan notes.

5 Replies
I'm not aware of this option coming to the native export feature in Planner

@itsanshulhere you need to use third-party apps to export the complete meta details to Excel and preserve it. Additionally, you can also configure the schedule run to export the data to excel for back up. Let me know if you need to know more about the app. 

@Santhosh Balakrishnanwhat 3rd-party applications have you used to export the full meta details to Excel? I have a user requesting this use case and would love to be able to give a solution. Thanks!

@itsanshulhere

Hi,

I use an alternative way using the fact that I receive an e-mail when a new comment is posted. Although maybe there are better options, this works fine for me.

I have a Folder in outlook where the Planner e-mails are moved automatically that is called "Planner e-mails", but it can work with the main folder if needed. When an e-mail is added to this folder the following code is executed, where the Title, Date and Body text is passed to another macro which open an Excel file and to paste the data.

 

 

Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
  Dim outlookApp As Outlook.Application
  Dim objectNS As Outlook.NameSpace
  Dim inboxItems As Outlook.Items
  Dim item As Object
  Dim myTitle As Outlook.MailItem
  Dim myDate, myBody  As String
  Dim DataArray(3) As Variant

  Set outlookApp = Outlook.Application
  Set objectNS = outlookApp.GetNamespace("MAPI")
  Set inboxItems = objectNS.GetDefaultFolder(olFolderInbox).Folders("Planner e-mails").Items

Set item = objectNS.GetItemFromID(EntryIDCollection)

If TypeName(item) = "MailItem" Then
    If InStr(item.Subject, "RE: Comments on task ") <> 0 Then
        Set myTitle = item
        myDate = item.CreationTime
        myBody = item.Body
        DataArray(1) = myTitle
        DataArray(2) = myDate
        DataArray(3) = myBody
        OpenExcelFileFromOutlookVBA (DataArray)
    
    End If
    'Result = MsgBox(MessageInfo, vbOKOnly, "New Message Received")
End If

End Sub

 

 

The macro to open the Excel file is the following. Then in that Excel file there is a macro "Module3.InsertOutlookComments" to paste the data.

 

Sub OpenExcelFileFromOutlookVBA(DataArray)

'To make sure the excel application was available from within outlook I had to go into the menus and make sure the reference was available.
'tools>references>'Microsoft Excel 16.0 Obecjt Library' (or similar)
    
    ' Excel Application, workbook, and sheet object
    Dim xlApp As Excel.Application
    Dim xlBook As Excel.Workbook
    Dim xlSheet As Object
    
    ' Filename
    Dim fileDoesExist As Boolean
    Dim FileName As String
    
    ' Create Excel Application
    Set xlApp = CreateObject("Excel.Application")
    xlApp.Visible = False
    
    Set xlBook = xlApp.Workbooks.Open("S:\Excel file.xlsm")
    Set xlSheet = xlBook.Sheets(1)

    
    ' Do stuff with Excel workbook
    With xlApp
        With xlBook
            
            Dim Comment As String
            Dim CommentDate As Date
            Dim Project As String
                       
            CommentDate = DataArray(2)
            
            If DateDiff("n", CommentDate, Now()) < 10 Then
                Comment = Left(DataArray(3), 20)
                Project = DataArray(1)
                
                xlBook.Application.Run "Module3.InsertOutlookComments", DataArray
                
            End If
           
        End With
    End With
    xlBook.Close SaveChanges:=True
    xlApp.Quit
End Sub