|
-
Jul 28th, 2005, 09:34 PM
#1
Thread Starter
Junior Member
Outlook:Selecting an email, extract information from it
Hi, I'm new to programming in Outlook. I've searched quite a few places to find out how to do this.
I want to be able to retrieve information such as the name of the sender, the email body, etc. by selecting an email, then click on a button that I've created. I'm not sure how to refer to the selected email as well as referring to the specific fields of it. I would really appreciate if someone can point me in the right direction.
Thanks in advance.
-
Jul 28th, 2005, 10:43 PM
#2
Re: Outlook:Selecting an email, extract information from it
I have several Outlook code examples on these Forums. 
You will want to start with telling us how you added your "button"? Is it added in via an Add-In, Outlook VBA, VB6 automation, or VB.NET/C#, etc.
An email is an Outlook.MailItem.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 07:54 AM
#3
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
hey RobDog, thanks for the quick reply
I used Visual Studio VB to add the add-in. I found some code, can't remember where now, that adds a button and it's as follow:
VB Code:
Public Sub OnStartupComplete(ByRef custom As System.Array) Implements Extensibility.IDTExtensibility2.OnStartupComplete
Dim oCommandBars As CommandBars
Dim oStandardBar As CommandBar
On Error Resume Next
' Set up a custom button on the "Standard" command bar.
oCommandBars = applicationObject.CommandBars
If oCommandBars Is Nothing Then
' Outlook has the CommandBars collection on the Explorer object.
oCommandBars = applicationObject.ActiveExplorer.CommandBars
End If
oStandardBar = oCommandBars.Item("Standard")
If oStandardBar Is Nothing Then
' Access names its main toolbar Database.
oStandardBar = oCommandBars.Item("Database")
End If
' In case the button was not deleted, use the exiting one.
MyButton = oStandardBar.Controls.Item("New Opportunity")
If MyButton Is Nothing Then
MyButton = oStandardBar.Controls.Add(1)
With MyButton
.Caption = "New Opportunity"
.Style = MsoButtonStyle.msoButtonCaption
' The following items are optional, but recommended.
' The Tag property lets you quickly find the control
' and helps MSO keep track of it when more than
' one application window is visible. The property is required
' by some Office applications and should be provided.
.Tag = "New Opportunity"
' The OnAction property is optional but recommended.
' It should be set to the ProgID of the add-in, so that if
' the add-in is not loaded when a user clicks the button,
' MSO loads the add-in automatically and then raises
' the Click event for the add-in to handle.
.OnAction = "!<MyCOMAddin.Connect>"
.Visible = True
End With
End If
' Display a simple message to show which application you started in.
'MsgBox("Started in " & applicationObject.Name & ".")
oStandardBar = Nothing
oCommandBars = Nothing
End Sub
Also, I've found a function that returns the sender's address. But it takes an Outlook.Mailitem as an input. How can I pass the mail that's been selected by the user?
VB Code:
Function GetMailItemSenderAddress(ByVal oOutlookMail As Outlook.MailItem) As String
Dim oMapiMessage As Object 'MAPI.Message
Dim oSession As Object 'MAPI.Session
Dim sEntryID As String
' Dim sEntryID As String
MsgBox(oOutlookMail)
oSession = CreateObject("MAPI.Session")
'Logon to the existing session
oSession.Logon("", "", False, False)
'Get the message Information
sEntryID = oOutlookMail.EntryID
sEntryID = oOutlookMail.Parent.StoreID
'Get the message
oMapiMessage = oSession.GetMessage(sEntryID, sEntryID)
'Extract the Sender's Address and Return value
GetMailItemSenderAddress = oMapiMessage.Sender.Address
oSession.Logoff()
oSession = Nothing
oMapiMessage = Nothing
Exit Function
ErrFailed:
' Debug.Print(Err.Description)
Debug.Assert(False)
GetMailItemSenderAddress = ""
End Function
-
Jul 29th, 2005, 08:41 AM
#4
Re: Outlook:Selecting an email, extract information from it
You don't need the MailItem to do this..
Here is some sample code that I have
VB Code:
Dim myOlExp As Explorer
Dim myOlSel As Selection
Dim myOlMail As MailItem
Dim i As Integer, j As Long
Set myOlExp = ActiveExplorer
Set myOlSel = myOlExp.Selection
For j = 1 To myOlSel.Count
Set myOlMail = myOlSel.Item(j)
MsgBox myOlMail.Subject
MsgBox myOlMail.Sender
Set myOlMail = Nothing
Next j
Set myOlSel = Nothing
Set myOlExp = Nothing
It picks up the selected email and get's both the subject and the sender
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 08:58 AM
#5
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
Hey Danny,
On the line: myOlExp = ActiveExplorer
It says ActiveExplorer is not declared. The other three variables I've added 'Outlook.' in front of them and they seem to be fine. How can I fix that line?
-
Jul 29th, 2005, 09:14 AM
#6
Re: Outlook:Selecting an email, extract information from it
VB Code:
Dim myOlApp As Outlook.Application
Dim myOlExp As Outlook.Explorers
Dim obSi As Outlook.Selection
Dim obMi As Outlook.MailItem
Set myOlApp = GetObject(,"Outlook.Application")
Set myOlExp = myOlApp.Explorers
Set obSi = myOlExp.Item(1).Selection
For i = 1 To obSi.Count
Set obMi = obSi.Item(i)
Debug.Print obMi.SenderName
Debug.Print obMi.Subject
Next i
Set obMi = Nothing
Set obSi = Nothing
Set myOlExp = Nothing
Set myOlApp = Nothing
Try that one
Last edited by dannymking; Jul 29th, 2005 at 09:31 AM.
Reason: Corrected Code
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 09:27 AM
#7
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
What do I declare obMi, obSi, obEx and obOt as?
-
Jul 29th, 2005, 09:28 AM
#8
Re: Outlook:Selecting an email, extract information from it
Sorry.. Copy and paste error.. will fix it in the original
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 09:40 AM
#9
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
It works!
Thanks!
I have a few more questions though. Where can I look for documentations on other fields? Specifically the body of the email, date, etc.?
When I first access that code, there's a pop up that asks if I'm going to allow the program to access my email. Is it possible to get rid of that somehow? May be not by code but through registry?
Another question, which is an entirely different topic, how persistent are class variables? I have a public class variable in my form that I would like to be accessible in other classes such as Connect, through out the instance of Outlook. How can I achieve that?
-
Jul 29th, 2005, 09:46 AM
#10
Re: Outlook:Selecting an email, extract information from it
Because you have declared obMi As Outlook.MailItem you can scroll through the remainder of a mail item's properties by pressing .
The pop up message is outlook security Perform a search for ClickYes, this is program that will continue to scan for messages like this and click's the yes button for you. There are other methods which does include changing the registry.
To allow a variable to be available throughout your whole project declare it as a global variable in module (or Public if you prefer)
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 10:28 AM
#11
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
Since I'm creating an add-in, would the global variable be in the Connect class? I tried to declare the global variable in the form but I suppose the value of the variable is re-initialized everytime the form is loaded.
How can I declare the variable in Connect and be able to use it in the form as well? It wouldn't let me do Connect.globalvar. I've also tried defining an object for connect then go objConnect.globalvar and that crashes.
-
Jul 29th, 2005, 10:28 AM
#12
Re: Outlook:Selecting an email, extract information from it
 Originally Posted by dannymking
You don't need the MailItem to do this..
But you are using the MailItem.
VB Code:
Dim obMi As Outlook.MailItem
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 10:38 AM
#13
Re: Outlook:Selecting an email, extract information from it
That's Just Picking on me 
In fact you don't need the mail item.. it is easier with it though..
VB Code:
Dim myOlApp As Outlook.Application
Dim myOlExp As Outlook.Explorers
Dim obSi As Outlook.Selection
Set myOlApp = GetObject(,"Outlook.Application")
Set myOlExp = myOlApp.Explorers
Set obSi = myOlExp.Item(1).Selection
For i = 1 To obSi.Count
Debug.Print obSi.Item(i).SenderName
Debug.Print obSi.Item(i).Subject
Next i
Set obSi = Nothing
Set myOlExp = Nothing
Set myOlApp = Nothing
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 10:46 AM
#14
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
hey guys...referring to my post , what should I do about global variable?
Danny, your code was working fine but I don't know what's wrong now.
VB Code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim myOlApp As Outlook.Application
Dim myOlExp As Outlook.Explorers
Dim obSi As Outlook.Selection
Dim obMi As Outlook.MailItem
Dim i As Integer
MsgBox("1")
myOlApp = GetObject(, "Outlook.Application")
MsgBox("2")
myOlExp = myOlApp.Explorers
MsgBox("3")
obSi = myOlExp.Item(1).Selection
MsgBox("about if")
If obSi.Count > 0 Then
MsgBox("in if")
For i = 1 To obSi.Count
obMi = obSi.Item(i)
MsgBox(obMi.SenderName)
MsgBox(obMi.Body)
Next i
obMi = Nothing
obSi = Nothing
myOlExp = Nothing
myOlApp = Nothing
Else
MsgBox("in else")
MsgBox("Please select an email.")
End If
Me.Close()
End Sub
It crashes after msgbox 1 pops up. Any idea?
-
Jul 29th, 2005, 10:51 AM
#15
Re: Outlook:Selecting an email, extract information from it
This is actually inside Outlook? or some other office app?
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 10:53 AM
#16
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
It's used in Outlook, developed in Visual Studio.
-
Jul 29th, 2005, 10:59 AM
#17
Re: Outlook:Selecting an email, extract information from it
Ok the code is actually from Access...
The line that is causing the problem is the attempt to GetObject if outlook is not open then this will cause a problem.
If the code is inside Outlook you should be able to drop the outlook part of it... like so
VB Code:
Dim myOlExp As Explorers
Dim obSi As Selection
Dim obMi As MailItem
Set myOlExp = Application.Explorers
Set obSi = myOlExp.Item(1).Selection
For i = 1 To obSi.Count
Set obMi = obSi.Item(i)
Debug.Print obMi.SenderName
Debug.Print obMi.Subject
Next i
Set obMi = Nothing
Set obSi = Nothing
Set myOlExp = Nothing
In my corporation VBA is disabled behind Outlook so I cannot test to see if this will actually work
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 11:11 AM
#18
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
The code wouldn't be used if Outlook is not opened though. I just kept getting the follow msg when it crashes:
Object reference not set to an instance of an object.
Also when I tried the code you provided above, I'm not sure what to set Application as....
-
Jul 29th, 2005, 11:20 AM
#19
Re: Outlook:Selecting an email, extract information from it
You do not need to set Application to anything.. It refers to the Application to which the code resides..
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 11:26 AM
#20
Re: Outlook:Selecting an email, extract information from it
Looking back over your code you are using .Net to build this.. in testing it will attempt to GetObject of Outlook..
If Outlook is not open then it will fail.. you will need to CreateObject instead.
VB Code:
myOlApp = CreateObject("Outlook.Application")
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 11:31 AM
#21
Re: Outlook:Selecting an email, extract information from it
plui31, you are writting this in .NET. Which version and it appears to be automating Outlook and not actually in VBA.
Your attaching your variable object to the .NET Application object and not Outlooks?
Missed that one Danny
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 11:44 AM
#22
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
 Originally Posted by dannymking
Looking back over your code you are using .Net to build this.. in testing it will attempt to GetObject of Outlook..
If Outlook is not open then it will fail.. you will need to CreateObject instead.
VB Code:
myOlApp = CreateObject("Outlook.Application")
I'm testing it by opening up Outlook manually then click on the button I've added. Should I have CreateObject anyway?
-
Jul 29th, 2005, 11:46 AM
#23
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
I'm using Microsoft Visual Studio .NET 2003.
 Originally Posted by RobDog888
Your attaching your variable object to the .NET Application object and not Outlooks?
I'm not sure what you're asking here
-
Jul 29th, 2005, 12:12 PM
#24
Re: Outlook:Selecting an email, extract information from it
In VB.NET there is an Application object and also in Outlook. Since there was code like this...
VB Code:
Set myOlExp = Application.Explorers
VB doesnt know which your referring to. Now however your current code is , it needs to make the distinction between the two by using the myOlApp object variable being set to the Outlook.Application instance.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 03:39 PM
#25
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
aah okay. thanks It's working now.
I have a question about the body of the Outlook message. How is a newline represented? I want to replace every newline with a special character. How can I do that?
-
Jul 29th, 2005, 03:44 PM
#26
Re: Outlook:Selecting an email, extract information from it
The new line character is ...
vbNewLine
Chr(13) & Chr(10)
vbCrLf
You can replace a new line with your own character by using the Replace function.
VB Code:
strBody = Replace(strBody, vbNewLine, "NL") 'Or ??? character instead of "NL"
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 03:53 PM
#27
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
hey RobDog
I've tired the following:
VB Code:
iBody = Replace(iBody, vbNewLine, "%0a")
iBody = Replace(iBody, Chr(13) & Chr(10), "%0a")
iBody = Replace(iBody, vbCrLf, "%0a")
And I also have this: Replace(iBody, " ", "%20")
I sent myself an email that looks like this:
first line
second line
And after the replace, it merges the string into first%20linesecond%20line.
What's the problem?
-
Jul 29th, 2005, 03:55 PM
#28
Re: Outlook:Selecting an email, extract information from it
Nothing. Your taking out the newlines so you end up with a string with your substitute char as the line breaks but since its not a line break it wont break.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 03:56 PM
#29
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
True...but how come my substitute character, "%0a", isn't there?
-
Jul 29th, 2005, 04:00 PM
#30
Re: Outlook:Selecting an email, extract information from it
What char does "%0a" represent? I know its supposed to be a web thing, right?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 04:02 PM
#31
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
Yeah, it's suppose to be a newline for forms and %20 is a space. Any idea how to get it to work?
-
Jul 29th, 2005, 04:06 PM
#32
Re: Outlook:Selecting an email, extract information from it
What is the version of Outlook and what is the .BodyFormat of the email?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 04:08 PM
#33
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
It's Outlook 2000.
I'm not sure what .BodyFormat is...
This is weird. I changed my code to:
iBody = Replace(iBody, vbNewLine, "xxx")
and it was fine. It got it right. But when it's "%0a", It just merges together...
-
Jul 29th, 2005, 04:13 PM
#34
Re: Outlook:Selecting an email, extract information from it
Will the newline work if its not in a form?
.BodyFormat is only available in Outlook 2002+
You may want to use the .HTMLBody to display your body text in HTML. Your special chars should work correctly in that format.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 29th, 2005, 04:23 PM
#35
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
 Originally Posted by RobDog888
Will the newline work if its not in a form?
I think as long as it's a textbox then it should work.
 Originally Posted by RobDog888
.BodyFormat is only available in Outlook 2002+
You may want to use the .HTMLBody to display your body text in HTML. Your special chars should work correctly in that format.
How do I do that?
-
Jul 29th, 2005, 04:24 PM
#36
Re: Outlook:Selecting an email, extract information from it
You can't it's only available in 2002 and you are using 2000
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 29th, 2005, 04:37 PM
#37
Re: Outlook:Selecting an email, extract information from it
 Originally Posted by dannymking
You can't it's only available in 2002 and you are using 2000
What U talk'n bot willis? 
The .HTMLBody is available in Outlook 2000.
Here is the specifics on the HTMLBody property in Outlook 2000.
http://msdn.microsoft.com/library/de...roHTMLBody.asp
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 30th, 2005, 03:05 AM
#38
Re: Outlook:Selecting an email, extract information from it
mis-read.. though he was talking about .bodyformat
Danny
Never Think Impossible
If you find my answer helpful then please add to my reputation
-
Jul 30th, 2005, 11:05 PM
#39
Thread Starter
Junior Member
Re: Outlook:Selecting an email, extract information from it
aaah alright. I'll look into it.
Thanks for all your help, Danny & RobDog!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|