Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

microsoft exchange server/outlook/VB

Posted on 1998-06-01
8
Medium Priority
?
198 Views
Last Modified: 2010-05-03
Have you ever used Microsoft Outlook? If yes, then here is the question : if you open tasks in outlook, a spread sheet will open with a header column and if you click on one of the rows, an assign task window will open. i want to incorporate the same in to my VB application. can somebody please direct me as to how to go about it? intially i am giving 50 points, but i can increase the points accordingly.
thanks in advance,
vmano.
0
Comment
Question by:vmano
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 150 total points
ID: 1462241
vmano,

vmano,

Basically Task spreadsheet is a special control but you can do something similar to it using List View control with LVS_EX_GRIDLINES and LVS_EX_CHECKBOXES extended styles and use the List View's DblClick to activate the Task details form.

Example
=======
Private Const LVM_FIRST = &H1000
Private Const LVM_SETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 54
Private Const LVM_GETEXTENDEDLISTVIEWSTYLE = LVM_FIRST + 55
Private Const LVS_EX_GRIDLINES = &H1
Private Const LVS_EX_CHECKBOXES = &H4

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal lpMsg As Long, ByVal dwParam As Long, ByVal lpParam As Long) As Long

Private Function LVXCheckBoxes(lvw As ListView, bMode As Boolean) As Boolean
 Dim X As Long, dwStyle As Long
 
 LVXCheckBoxes = True
 dwStyle = SendMessage(lvw.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
 If bMode Then
  dwStyle = dwStyle Or LVS_EX_CHECKBOXES
 Else
  dwStyle = dwStyle Xor LVS_EX_CHECKBOXES
 End If
 X = SendMessage(lvw.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle)
End Function

Private Function LVXGridLines(lvw As ListView, bMode As Boolean) As Boolean
 Dim X As Long, dwStyle As Long
 
 LVXGridLines = True
 dwStyle = SendMessage(lvw.hWnd, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
 If bMode Then
  dwStyle = dwStyle Or LVS_EX_GRIDLINES
 Else
  dwStyle = dwStyle Xor LVS_EX_GRIDLINES
 End If
 X = SendMessage(lvw.hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle)
End Function

Private Sub Form_Load()
 ListView1.ColumnHeaders.Add , , " ", 10
 ListView1.ColumnHeaders.Add , , "Subject", ListView1.Width / 2
 ListView1.ColumnHeaders.Add , , "Due Date", ListView1.Width / 2
 LVXGridLines ListView1, True
 LVXCheckBoxes ListView1, True
End Sub

Private Sub ListView1_DblClick()
 Form2.Show
End Sub


Best regards
Bin Huwairib
0
 
LVL 3

Author Comment

by:vmano
ID: 1462242
i am very sorry to say that your code is not at all working. do i have to do anything else other than your code? please respond.
thanks,
vmano
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462243
How it is not working? do you get any error message? please explain more.

Bin Huwairib
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Author Comment

by:vmano
ID: 1462244
i did put a listview control on my form and and also your code accordingly. when i run it, it just don't do anything except for a blank list view on the form. no error messages also. please let me know if you want more info.
thanks for responding,
vmano.
0
 
LVL 3

Author Comment

by:vmano
ID: 1462245
OK. let me rephrase the question.
i am developing a case management system and are trying to integrate the user interface to include a view of a users outlook tasks in our main window. i would like to find an ocx or something to use to connect to the exchange server without making our users open outlook.
hope this is much more clear as to what i am looking for.
thanks in advance,
vmano


0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462246
vmano,

Replace Form_Load sub with the following:

Private Sub Form_Load()
 ListView1.View = lvwReport
 ListView1.ColumnHeaders.Add , , " ", 10
 ListView1.ColumnHeaders.Add , , "Subject", ListView1.Width / 2
 ListView1.ColumnHeaders.Add , , "Due Date", ListView1.Width / 2
 LVXGridLines ListView1, True
 LVXCheckBoxes ListView1, True
End Sub

Bin Huwairib
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1462247
Bought This Question.
0
 
LVL 3

Author Comment

by:vmano
ID: 1462248
MirkWood,
What is this all about "BUYING"? Can you tell me more about this buying questions?

vmano
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question