User Profile
celinafregoso99
Copper Contributor
Joined 5 years ago
User Widgets
Recent Discussions
Can't receive new emails with RDCOMClient
I'm trying to use R to load my emails from Outlook 365. Yesterday I tried this: library(RDCOMClient) outlook_app <- COMCreate("Outlook.Application", existing = FALSE) outlookNameSpace <- outlook_app$GetNameSpace("MAPI") folder <- outlookNameSpace$GetDefaultFolder(6) emails <- folder$Items and it worked fine. When I ran the following code: emails(1)[['Subject']] I could see the subject of the last email on my Inbox. Great! However, I couldn't get any updates from that point. If I run the same code today, I get exactly the same emails than yesterday, eventhough I have new emails on my Inbox. I tryed with and without the existing = FALSE option in COMCreate function, but with no success. What I'm doing wrong? How can update the data with the new emails? By the way, is there any good documentation or tutorial about using RDCOMClient with Outlook? I still can't get the logic of this library. Thanks!1.6KViews0likes1CommentSend Sharing Link for Sharepoint Folder
I have been battling with this for a few days now... I am using CSCOM to connect to SharePoint. Everything is working fine, creating folders and uploading files. However, I now need to create a shared folder (parent level) link for external users and then initiate the email invite as per the "links giving access" not direct access. I can create and send an anonymous link but this is not what we are after. string s = "password"; SecureString passWord = new SecureString(); foreach (var c in s) passWord.AppendChar(c); string siteURL = "siteurl"; string parentFolder = "parentfolder"; using (Microsoft.SharePoint.Client.ClientContext CContext = new Microsoft.SharePoint.Client.ClientContext(siteURL)) { CContext.Credentials = new SharePointOnlineCredentials("s-eConnect@nzblood.co.nz",passWord); var subFolders = CContext.Web.GetFolderByServerRelativeUrl(parentFolder).Folders; CContext.Load(subFolders); CContext.ExecuteQuery(); <<create sharing link for parent folder and send email to external user>>> foreach (var subFolder in subFolders) { Console.WriteLine(subFolder.Name.ToString()); } } The above code iterates thru the sub folders of the parent, this is me just making sure I am getting the right data. But I can't seem to find anything that allows me to create the sharing link and send to an external user so they get an invite etc... If I add in the following, it creates an invite but adds the user to the entire site via Direct Access ... not by link to the folder.... var users = new List<UserRoleAssignment>(); users.Add(new UserRoleAssignment() { UserId = "rhyndman@altara.net", Role = Role.View }); WebSharingManager.UpdateWebSharingInformation(CContext, CContext.Web, users, true, "You've been invited...", true, true); CContext.ExecuteQuery(); Any help would be appreciated. Many thanks853Views0likes0CommentsShow Azure DevOps Task / Sprint Statistics on SharePoint (PowerApps)
I want to show KPIs (Key Performance Indicator) on my SharePoint. My Datasource will be my TFS (Azure DevOps). For example showing the planned and finished Tasks for a Sprint on SharePoint and generate a graph out of it. I saw that in Microsoft PowerApps - which are integrateable in my SharePoint-View - there are DevOps-Connectors, but i didnt rly saw a possibility to aggregate my task-statistics (planned / finished in a sprint) and show them. Solution Writing a C#-Backend that has a TFS-Client running. Can I use this for a Power-App-CustomConnector? Is there another way to acess data in a PowerApp from a REST-API? Worst Case the Backend will have shedule to create and update SharePoint-Tables with my TFS-Stats What is the best way to aggregate and show my tfs (azure devOps) statistics on my page?966Views0likes0CommentsWhy can I send gmail emails with python, but not outlook emails?
I'm trying to send custom emails to a list of people from a csv file. I practiced it with gmail and everything worked just fine, but I cannot get it to work with outlook. The code starts running but never finishes. Here's the code: import csv, smtplib, ssl message = """Subject: Your company Hi {name}, your company is {company}""" from_address = "myemail@email.com" password = input("Type your password and press enter: ") context = ssl.create_default_context() with smtplib.SMTP_SSL("smtp-mail.outlook.com", 465, context=context) as server: server.login(from_address, password) with open("practice.csv") as file: reader = csv.reader(file) next(reader) for name, email, grade in reader: server.sendmail( from_address, email, message.format(name=name,company=company), )1.1KViews0likes0CommentsVBA - Can't “Check In” uploaded document on SharePoint
i have a VBA code that uploads new document on SharePoint. It uploads new row on sharepoint, but it doesn't start a workflow for new item, because it needs to be "Checked In". When i do it manually - i click Upload, choose a file, fill up required fields, and after that i press "Check In" which add new item to the sharepoint and automatically starts a workflow. When i do it by VBA - it adds new item with described fields, but it doesn't start a workflow because it needs "Check In" yet. I've tried with codes like that from official documentation of Microsoft Sub CheckInOut(strWkbCheckIn As String) ' Determine if workbook can be checked in. If Workbooks(strWkbCheckIn).CanCheckIn = True Then Workbooks(strWkbCheckIn).CheckIn MsgBox strWkbCheckIn & " has been checked in." Else MsgBox "This file cannot be checked in " & _ "at this time. Please try again later." End If End Sub i think when i open a workbook - it's only in read-only mode so i can't use there "Check In" method. Manually i can do it without any problem on SharePoint Site.1.1KViews0likes0CommentsOutlook export multiple emails in Excel workbook but different excel worksheets
I'm new using vba, I want to export from outlook emails selected into a workbook path, and each email (subject, body,etc.) should be store in different worksheet and I'm trying to edit this macro because its almost what I need, especialy the part of olFormatHTML and WordEditor, because of split The idea is 1.-select multiple emails in Outlook 2.-open file path 3.-for each email selected in Outlook will be stored in a single worksheet from file opened I'm getting issue with the macro in this 3rth part A).- from selected items the macro do loop and just take the first email selected B).- the emails store in different workbooks, should be stored in the same workbook that I opened here is the code Public Sub SplitEmail() Dim rpl As Outlook.MailItem Dim itm As Object Dim sPath As String, sFile As String Dim objDoc As Word.Document Dim txt As String Dim xlApp As Excel.Application Dim wb As Excel.Workbook Dim i As Long Dim x As Long '---------------------------- Dim myOlExp As Outlook.Explorer Dim myOlSel As Outlook.Selection Set myOlExp = Application.ActiveExplorer Set myOlSel = myOlExp.Selection For x = 1 To myOlSel.Count '---------------------------------------------- Set itm = GetCurrentItem() 'A)I think the issuefrom selecting 1 item is located here '||||||||||||||||||||||||||||||||||||||||| sPath = "C:\Users\Ray\" sFile = sPath & "Macro.xlsm" If Not itm Is Nothing Then Set rpl = itm.Reply rpl.BodyFormat = olFormatHTML 'rpl.Display End If Set objDoc = rpl.GetInspector.WordEditor txt = objDoc.Content.Text '|||||||||||||||||||||||||||||||||||||||||||||| Set xlApp = CreateObject("Excel.application") xlApp.Visible = True Set wb = xlApp.Workbooks.Open(sFile) 'B) tried to move it to the beginning and macro doesn't work '|||||||||||||||||||||||||||||||||||||||||||||| For i = LBound(Split(txt, Chr(13)), 1) To UBound(Split(txt, Chr(13)), 1) wb.Worksheets(x).Range("A" & i + 1).Value = Split(txt, Chr(13))(i) 'B)emails in diferrent sheet but no same workbook Next i '------------------------------------------------------ Next x End Sub Function GetCurrentItem() As Object Dim objApp As Outlook.Application Set objApp = Application On Error Resume Next Select Case TypeName(objApp.ActiveWindow) Case "Explorer" Set GetCurrentItem = objApp.ActiveExplorer.Selection.item(1) Case "Inspector" Set GetCurrentItem = objApp.ActiveInspector.CurrentItem End Select GetCurrentItem.UnRead = False Set objApp = Nothing End Function this issue is B: The code above, when macro do loop "x" increase, the email store in different sheets but in different workbooks, should be in the same workbook1.1KViews0likes1CommentCopying contents of Sharepoint folder (but not actual folder) up a directory in the same site
I'm attempting to remove some unnecessary parents folders from our Sharepoint Online sites in Powershell now that we've changed our policies regarding file retention. We want to get rid of the pre-existing 2020 folder to minimise the folder structure complexity for users to navigate, and ensure they don't create a folder for 2021 and copy files into there, taking up Sharepoint space. As such I'm looking to extract the contents of the 2020 folder in all of our Teams sites to the 'Shared Documents/General' location, then delete the empty 2020 folder. So it goes from 'Shared Documents/General/2020/[all content]' to 'Shared Documents/General/[all content]' The MovePnP-Folder function naturally moves the entire folder, but it's the folder itself (not its contents) I'm looking to get rid of. The MovePnP-File function appears to work in strange ways and tells me I don't have rights to move files when I try, despite being a Global Admin. It also doesn't appear to work with wildcards, which I'd be expecting to use to ensure all the contents of a folder are selected. I'm looking to have this recur for all the Teams sites in our environment. May I have some assistance here, please?753Views0likes0Comments
Groups
Recent Blog Articles
No content to show