Click here to Skip to main content
15,898,134 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: data structure Pin
Vikram A Punathambekar13-Dec-07 17:33
Vikram A Punathambekar13-Dec-07 17:33 
GeneralRe: data structure Pin
Sho_Asylumn13-Dec-07 20:10
Sho_Asylumn13-Dec-07 20:10 
GeneralRe: data structure Pin
leppie13-Dec-07 20:15
leppie13-Dec-07 20:15 
GeneralRe: data structure [modified] Pin
Mustafa Ismail Mustafa13-Dec-07 19:04
Mustafa Ismail Mustafa13-Dec-07 19:04 
GeneralRe: data structure Pin
Leslie Sanford13-Dec-07 21:13
Leslie Sanford13-Dec-07 21:13 
GeneralRefresh VB.net form by another process Pin
manisghouri13-Dec-07 11:42
manisghouri13-Dec-07 11:42 
GeneralRe: Refresh VB.net form by another process Pin
Christian Graus13-Dec-07 12:07
protectorChristian Graus13-Dec-07 12:07 
GeneralRe: Refresh VB.net form by another process Pin
manisghouri13-Dec-07 14:27
manisghouri13-Dec-07 14:27 
Many thanks for your reply. Let me be more specific to my problem.

- I am calling an 'Outlook 2000 New Message window' from VB.Net from.
- On Email ItemSend event I am updating the database by using a VBA macro
and closing Message window.
- When I get focus back to my VB.Net application, I want to refresh my current form with recently updated data.

I am using the following code to create a new mail.

Public Sub NewEmail(ByVal txtEmail As String, ByVal intContId As Long)
Dim objOutlook As Outlook.Application
Dim objNamespace As Outlook.NameSpace
Dim objMAPIFolder As Outlook.MAPIFolder
Dim objItem As Outlook.MailItem
Dim objProp As Outlook.UserProperty

objOutlook = New Outlook.Application()
objNamespace = objOutlook.GetNamespace(Type:="MAPI")

Try
'creating a process but it's not working
Dim Proc As New Process
Dim ProcInfo As New ProcessStartInfo
ProcInfo.CreateNoWindow = True
ProcInfo.FileName = ""
ProcInfo.UseShellExecute = False
Proc.StartInfo = ProcInfo
Proc.EnableRaisingEvents = True
AddHandler Proc.Exited, AddressOf ProcessExited
Proc.Start()

objMAPIFolder = objNamespace.GetDefaultFolder & _
(Outlook.OlDefaultFolders.olFolderInbox)

objItem = objOutlook.CreateItem(Outlook.OlItemType.olMailItem)

objItem.To = txtEmail
objProp = objItem.UserProperties.Add("ContactId", & _
Outlook.OlUserPropertyType.olNumber, False, False)
objProp.Value = intContId

objItem.Display()

objOutlook = Nothing
objNamespace = Nothing
objMAPIFolder = Nothing
objItem = Nothing
objProp = Nothing

Catch ex As Exception
msgbox err.message

End Try

End Sub

I would appreciate if you kindly guide me how to include a process object in this function. If you think there is a better way to solve this problem, kindly let me know.

Thanks again

Nas
GeneralRe: Refresh VB.net form by another process Pin
Luc Pattyn13-Dec-07 14:59
sitebuilderLuc Pattyn13-Dec-07 14:59 
GeneralFastest way of fetching data from database server Pin
Eli Nurman13-Dec-07 9:29
Eli Nurman13-Dec-07 9:29 
GeneralRe: Fastest way of fetching data from database server Pin
Dave Kreskowiak13-Dec-07 10:25
mveDave Kreskowiak13-Dec-07 10:25 
QuestionVBA I need some help. Pin
code123581313-Dec-07 9:07
code123581313-Dec-07 9:07 
GeneralRe: VBA I need some help. Pin
Christian Graus13-Dec-07 9:30
protectorChristian Graus13-Dec-07 9:30 
GeneralRe: VBA I need some help. Pin
code123581313-Dec-07 9:48
code123581313-Dec-07 9:48 
GeneralRe: VBA I need some help. Pin
Dave Kreskowiak13-Dec-07 10:10
mveDave Kreskowiak13-Dec-07 10:10 
QuestionHello Pin
BOREC13-Dec-07 8:09
BOREC13-Dec-07 8:09 
Generalsearch engine Pin
BOREC13-Dec-07 9:08
BOREC13-Dec-07 9:08 
GeneralRe: search engine Pin
Christian Graus13-Dec-07 9:26
protectorChristian Graus13-Dec-07 9:26 
GeneralRe: Hello Pin
Christian Graus13-Dec-07 9:25
protectorChristian Graus13-Dec-07 9:25 
GeneralVB Pin
BOREC13-Dec-07 10:02
BOREC13-Dec-07 10:02 
GeneralRe: VB Pin
Dave Kreskowiak13-Dec-07 10:20
mveDave Kreskowiak13-Dec-07 10:20 
GeneralRe: VB Pin
Christian Graus13-Dec-07 11:35
protectorChristian Graus13-Dec-07 11:35 
GeneralDeserved reply, and sincere apology... Pin
BOREC13-Dec-07 12:58
BOREC13-Dec-07 12:58 
GeneralCODE Pin
BOREC13-Dec-07 9:40
BOREC13-Dec-07 9:40 
GeneralRe: CODE Pin
Christian Graus13-Dec-07 11:30
protectorChristian Graus13-Dec-07 11:30 

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.