Click here to Skip to main content
15,901,205 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCopying an image Pin
Zaegra16-Feb-07 2:26
Zaegra16-Feb-07 2:26 
AnswerRe: Copying an image Pin
kubben16-Feb-07 2:50
kubben16-Feb-07 2:50 
AnswerRe: Copying an image Pin
MatrixCoder16-Feb-07 3:38
MatrixCoder16-Feb-07 3:38 
AnswerRe: Copying an image Pin
Dave Kreskowiak16-Feb-07 4:41
mveDave Kreskowiak16-Feb-07 4:41 
GeneralRe: Copying an image Pin
Zaegra18-Feb-07 0:27
Zaegra18-Feb-07 0:27 
Questionwants to calculate Total from subreport & main Report!! Pin
priya_p23316-Feb-07 1:39
priya_p23316-Feb-07 1:39 
AnswerRe: wants to calculate Total from subreport & main Report!! Pin
Ankur.Bakliwal16-Feb-07 2:24
Ankur.Bakliwal16-Feb-07 2:24 
QuestionGetting Email Headers in Outlook Pin
u6ik16-Feb-07 0:29
u6ik16-Feb-07 0:29 
I've been trying to obtain the email header from messages in Outlook using VBA. I have done some investigation and found that in outlook they are stored separately and require use of the CDO library to get hold of the header. So, I used Tools-Reference to enable the CDO Win 2000 library, cdosys.dll and employed the code below - but on compiling in the Outlook VBA Editor it gives me errors in all references to that CDO library. Can anyone assist here? Many thanks Wink | ;)



<br />
Public Function InternetHeaders() As String <br />
     <br />
    Dim objOutlook As Outlook.Application <br />
    Dim objItem As Outlook.MailItem <br />
    Dim objCDO As MAPI.Session <br />
    Dim objMessage As MAPI.Message <br />
    Dim objFields As MAPI.Fields <br />
    Dim strID As String <br />
     <br />
    Const CdoPR_TRANSPORT_MESSAGE_HEADERS = &H7D001E <br />
     <br />
    On Error Resume Next <br />
     <br />
     ' Instantiate an Outlook Application object.<br />
    Set objOutlook = CreateObject("Outlook.Application") <br />
     <br />
     'Find the current email item and get its EntryID<br />
    Set objItem = objOutlook.ActiveInspector.CurrentItem <br />
    strID = objItem.EntryID <br />
     <br />
     'Then set up a CDO Session using a piggy-back login<br />
    Set objCDO = CreateObject("MAPI.Session") <br />
    objCDO.Logon "", "", False, False <br />
     <br />
     'Now get the item as a CDO Message<br />
    Set objMessage = objCDO.GetMessage(strID) <br />
     <br />
     'Now get the headers from the message<br />
    Set objFields = objMessage.Fields <br />
    InternetHeaders = objFields.Item(CdoPR_TRANSPORT_MESSAGE_HEADERS).Value <br />
     <br />
     'Now that the headers are captured in a string you can do whatever you want with them<br />
    objCDO.Logoff <br />
     <br />
    Set objFields = Nothing <br />
    Set objMessage = Nothing <br />
    Set objCDO = Nothing <br />
    Set objItem = Nothing <br />
    Set objOutlook = Nothing <br />
End Function <br />


u6ik

AnswerRe: Getting Email Headers in Outlook Pin
u6ik16-Feb-07 3:18
u6ik16-Feb-07 3:18 
GeneralRe: Getting Email Headers in Outlook Pin
u6ik16-Feb-07 6:37
u6ik16-Feb-07 6:37 
Questionimage in data grid Pin
Piyush Vardhan Singh15-Feb-07 23:22
Piyush Vardhan Singh15-Feb-07 23:22 
AnswerRe: image in data grid Pin
kubben16-Feb-07 2:53
kubben16-Feb-07 2:53 
GeneralRe: image in data grid Pin
Piyush Vardhan Singh20-Feb-07 19:04
Piyush Vardhan Singh20-Feb-07 19:04 
QuestionHow To hide Field on Crystal Report? Pin
priya_p23315-Feb-07 21:41
priya_p23315-Feb-07 21:41 
AnswerRe: How To hide Field on Crystal Report? Pin
Ankur.Bakliwal15-Feb-07 22:01
Ankur.Bakliwal15-Feb-07 22:01 
GeneralRe: How To hide Field on Crystal Report? Pin
priya_p23315-Feb-07 22:07
priya_p23315-Feb-07 22:07 
GeneralRe: How To hide Field on Crystal Report? Pin
Ankur.Bakliwal15-Feb-07 22:11
Ankur.Bakliwal15-Feb-07 22:11 
Questionsubreport crystal report 10, over lapping Pin
steve_rm15-Feb-07 18:33
steve_rm15-Feb-07 18:33 
AnswerRe: subreport crystal report 10, over lapping Pin
priya_p23315-Feb-07 22:12
priya_p23315-Feb-07 22:12 
AnswerRe: subreport crystal report 10, over lapping Pin
priya_p23316-Feb-07 0:17
priya_p23316-Feb-07 0:17 
QuestionBest ADO.NET Connection scope in Web Service Pin
GoodID15-Feb-07 16:02
GoodID15-Feb-07 16:02 
AnswerRe: Best ADO.NET Connection scope in Web Service Pin
Colin Angus Mackay16-Feb-07 2:07
Colin Angus Mackay16-Feb-07 2:07 
GeneralRe: Best ADO.NET Connection scope in Web Service Pin
GoodID18-Feb-07 17:15
GoodID18-Feb-07 17:15 
GeneralRe: Best ADO.NET Connection scope in Web Service Pin
Colin Angus Mackay18-Feb-07 21:39
Colin Angus Mackay18-Feb-07 21:39 
GeneralRe: Best ADO.NET Connection scope in Web Service Pin
GoodID18-Feb-07 23:11
GoodID18-Feb-07 23:11 

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.