Solved

microsoft exchange server/outlook/VB

Posted on 1998-06-01
8
189 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
  • 4
  • 3
8 Comments
 
LVL 5

Accepted Solution

by:
bin_huwairib earned 50 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MS Access - Capture pressed key onclick 4 42
using Access 8 76
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 56
Recommendation vb6 to vb.net or others 14 178
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

820 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