2013-07-21 5 views
-2

내 프로젝트는 Outlook의 본문 입력란에서 본문에 입력 한 항목을 Outlook의 텍스트 필드에서 보낸 데이터를 수정할 수있는 Outlook 본체 앞에 입력하고 업데이트 데이터를 보냅니다 Outlook에서 데이터베이스로 데이터를 업데이트 할 수있는 데이터베이스에 저장됩니까?Outlook에서 데이터베이스로 데이터를 가져 오기

+0

Outlook에서 데이터를 읽을 수도 있지만 질문이 명확하지 않습니다. Outlook 본체가 무엇입니까?! 이메일 본문 또는 무엇을 의미합니까? – VahidNaderi

+1

물론 가능하지만 지금까지 시도한 것을 보여줄 수 있습니까? – JMK

+0

VahidND 예. 이메일 본문 – user2586714

답변

0

나는 이와 같은 솔루션을 구축했으며 매일 작업 흐름의 일환으로 메일을 읽고 파일화하기 위해 매일 사용합니다. 그러나 다른 사람들이 암시하는 바에 따르면 당신은 도움이 필요한 것에 대해 구체적이어야합니다.

 If (TypeOf olItem Is Outlook.MailItem) Then 
      Dim olMailItem As Outlook.MailItem = TryCast(olItem, Outlook.MailItem) 

      If olMailItem.Permission = Outlook.OlPermission.olUnrestricted Then 
       strBody = olMailItem.HTMLBody     'file:///C:/AttSave/header.png 
      Else 
       strBody = "Rights Protected fix if I'm not in debugger" 
      End If 

      For Each olAttach In olMailItem.Attachments 
       If olAttach.Type <> Outlook.OlAttachmentType.olOLE Then 
        olAttach.SaveAsFile("c:\AttSave\" & olAttach.FileName) 
        'strBody = strBody.Replace("cid:header", "file:///C:/AttSave/header.png") 
        strCID = olAttach.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3712001E") 
        If strCID <> "" Then 
         strBody = strBody.Replace("cid:" & strCID, "file:///C:/AttSave/" & System.Web.HttpUtility.UrlEncode(olAttach.FileName)) 
        End If 
        lst_Attach.Items.Add(olAttach.FileName) 
       Else 
        MsgBox("open this one via outlook") 
       End If 

      Next 
      Me.webBody.DocumentText = strBody 
      Me.txtSubject.Text = olMailItem.Subject 
      If olMailItem.Importance = Outlook.OlImportance.olImportanceHigh Then 
       Me.txtSubject.ForeColor = Color.Red 
      Else 
       Me.txtSubject.ForeColor = Color.White 
      End If 

      'Dim palSender As Microsoft.Office.Interop.Outlook.AddressEntry 
      'palSender = mailItem.Sender 
      Me.txtSentDate.Text = olMailItem.SentOn 
      'Me.txtTo.Text = olMailItem.To 
      olSenderA = olMailItem.Sender 
      If IsNothing(olSenderA) = False Then 

       'Dim olConItem As Outlook.ContactItem 

       'olConItem = olSenderA.GetContact() 
       'If Not IsNothing(olConItem) Then 
       ' If olConItem.HasPicture = True Then 
       '  Stop 
       ' End If 
       'End If 


       Pa = olSenderA.PropertyAccessor 
       'Debug.Print(olRe.Name & "stp= " & Pa.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x39FE001E")) 
       Try 
        Me.txtFrom.Text = Me.txtFrom.Text & olSenderA.Name & " (" & Pa.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x39FE001E") & ")" 
       Catch ex As System.Runtime.InteropServices.COMException 
        'Stop 
        Me.txtFrom.Text = olMailItem.SenderName & " (" & olMailItem.SenderEmailAddress & ")" 
       Catch ex As Exception 
        Stop 
       End Try 
+0

감사합니다.하지만 감사합니다. BodyItem 읽을 파일 항목 및 각 textBox에 대해 그것을 저장할 테이블에 n 데이터베이스 Employees (Name, ImprovedAction, Challenge, dateChallenge, comment) – user2586714

관련 문제