Found it ...
Dim objUP As Outlook.UserProperty
objUP = objTask.UserProperties.Item("CC Ref")
Found it ...
Dim objUP As Outlook.UserProperty
objUP = objTask.UserProperties.Item("CC Ref")
Hello all, I'm using Outlook 2000 and I'm trying to access data held on a customised Outlook task form held in a public folder. I'm using the following code to get at what I need, and can see certain values via objTask, but I can't see where I get at other 'fields' used on the form. One of the fields, for example, is called "CC Ref", but I can't find where I can get at it.
Dim objOutlook As Outlook._Application
objOutlook = New Outlook.Application()
Dim objNS As Outlook._NameSpace = objOutlook.Session
Dim oAllPublicFolders As Outlook.MAPIFolder
Dim oPublicFolders As Outlook.MAPIFolder
Dim objCodeChangeRequests As Outlook.MAPIFolder
oPublicFolders = objNS.Folders.Item("Public Folders")
oAllPublicFolders = oPublicFolders.Folders.Item("All Public Folders")
objCodeChangeRequests = oAllPublicFolders.Folders.Item("Code Change Requests")
Dim objItems As Outlook.Items = objCodeChangeRequests.Items
Dim objTask As Outlook._TaskItem
objTask = objItems.GetFirst
Thanks in advance!
I am trying to populate a table in a strongly typed dataset used for the ReportViewer. I want to read in an XML file which was created manually using ds.WriteXML. The strongly typed dataset has been created to match the structure of the XML file written with ds.WriteXML. How do I read in the XML file, and populate the table within the dataset used for the ReportViewer?
Hello, I've been given a sample XML file in a structure that I haven't handled in VB.NET before and would appreciate some guidance. The structure is as follows: <Interface CompanyCode="COMP01" CreatedOn="2007-05-27T10:20:00" CreatedBy="PRODUCT" CreatorKey="PROD" SequenceNo="1" CreatorReference="NEWPRODUCT"> <Product ProductCode="P1"> <Description>Product 1 Description</Description> </Product> <Product ProductCode="P2"> <Description>Product 2 Description</Description> <Value EffectiveDate="2006-04-01"> <Price>5.50</Price> <Currency>GB</Currency> </Value> </Product> <Product ProductCode="P3"> <Description>Product 3 Description</Description> </Product> </Interface>
When I read the xml file in with ... Dim ds As DataSet = New DataSet("dataset") ds.ReadXml("prod2.xml") With DataGridView1 .DataSource = ds .DataMember = ds.Tables(2).TableName End With
... I can see that I've got 3 x tables ... "Interface", "Product", "Value". What I'm wondering is how do I get the "Value" table linked to "Product"? I was expecting (rightly or wrongly) to see some inherited values from product displayed in my DataGridView. Looking at the structure of the XML file, it seems to imply that there should be some inheritance???
Hello all, I've just installed a copy of VS2008 Standard, and I'm looking at the MicrosoftReportViewer, and the ability to design a new report from it. To get started with it, I'm using the wizard. What I'm finding is that the report doesn't display anything (data), although it is displaying the header text, and field names. The way I'm firing the report is via a button on form MultipleLicenceResponse.vb. This form has a DataGridView (dgvResponseData) on it, which gets its data from tblResponseData. This is opening LicenceReportPreview.vb via ...
Dim frmReport As New LicenceReportPreview
With frmReport
.Licence = "Display anything in this field for now"
.LicenceTable = tblResponseData ' Just to see if I can access this instead - which I can't!
End With
frmReport.ShowDialog()
The report wizard gets its object data from the LicenceReportPreview.vb class, where I'm selecting the LicenceReportPreview as the object and, for now, just the Licence property (which should be the string, "Display anything in this field for now") .... just to get something on the report! What am I missing? Does anybody know of a good tutorial that I can follow which shows me how to get the contents of my table onto the report?
Hello, As the title suggests, I've got a problem with a disappearing horizontal scrollbar on a ListBox where I'm using the DrawItem event. DrawItem is set to OwnerDrawFixed. I'm using VB.NET 2008 Express. I think I know WHY I'm not seeing the scrollbar, but I can't figure out how to fix it. I may have to use a DataGridView, but I'd prefer to understand the solution to the ListBox problem. What I think is happening is this line is filling my rectangle with my brush to the boundary of the rectangle: e.Graphics.FillRectangle(myBrush, e.Bounds)
The line is filling the rectangle with my data: e.Graphics.DrawString(Me.lstReportContent.Items(e.Index), e.Font, myBrush, New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height))
I've seen that I can reduce e.Bounds.Width, and each line is cut short. Naturally, I'd have thought that if I increase e.Bounds.Width, the item line would be longer than the visible rectangle width.
Is it possible to programmatically highlight a column in a DataGridView that I have right-clicked on (to display a ContextMenu)? The column headers have been hidden from the user.
Bizarre! How about something like: Dim bLogonResult As Boolean = Logon() If bLogonResult Then MessageBox.Show(bLogonResult) ElseIf Not bLogonResult Then PDM.Common.ClientData.RestartApplication = False Me.Close() End If
Is it DEFINATELY going into the 'Else'? You haven't got another Me.Close further down?
I'd be tempted to try: If bLogonResult Then .....
Is there an opposite of Me.DataGridView1.FirstDisplayedScrollingColumnIndex - so that I can determine the maximum ScrollingColumnIndex?
Hi, I'm using a variation of the following code from MSDN. I have conditions that are being met, and can display a message box to prove to myself that its reaching that point, but I'm not getting an ErrorProvider exclamation mark now that I've formatted the columns in my DataGridView to be numeric. The MSDN Code (from http://msdn2.microsoft.com/en-us/library/0ye0dkkw.aspx) is: MSDN Snippet: Private Sub Customers_ColumnChanging(ByVal sender As Object, _ ByVal e As System.Data.DataColumnChangeEventArgs) ' Only check for errors in the Product column If (e.Column.ColumnName.Equals("Product")) Then ' Do not allow "Automobile" as a product. If CType(e.ProposedValue, String) = "Automobile" Then Dim badValue As Object = e.ProposedValue e.ProposedValue = "Bad Data" e.Row.RowError = "The Product column contians an error" e.Row.SetColumnError(e.Column, "Product cannot be " & _ CType(badValue, String)) End If End If End Sub
Why would formatting my columns break the ability to display the icon?
This might help .... http://www.vbforums.com/showthread.php?t=479407[^]
The easiest method is to declare the variable on frmMainTools as public.
Have a look at "Interacting With Web Sites in Code" by clicking here
As Paul wrote, it does seem a little odd to be doing what you want to do. I'm sure you have your reasons. A couple of options for you: 1. Your database name remains static, and when you launch the application in a new month, it renames your current database to something else, and creates/copies your blank database in its place. This way, you always connect to a database with the same name. 2. You declare a string variable (strMonth), and then have some code that decides which month you are in, and assigns a value to strMonth - so if you're in July, strMonth = "July". You then connect to strMonth, and not a specifically named file. An array of months might be an efficient method of doing this.
Thanks for your thoughts. I managed to fix it. The problem was that I had created a sorted DataView, and populated the DataGridView with it - which had the effect of sorting one of the columns, which seemed to have messed up the indexing. One thing I can't get my head around is that the grid was bound to the dataview, so the indices should, I think, have worked - irrespective of the sort.
Anybody got any thoughts on this? One thing I forgot to say is that if I put a msgbox in place, when the conditions are met, it show the message - its just the errorprovider notification icon that I can't get.
Hi, I'm trying to update the values in a DataGridView. It works ok, and I can see my rows and columns being updated, but when I scroll down the grid, and hit the bottom, it throws an "object not set to an instance of an object" error - and the space occupied by the grid changes to a red cross. I'm obviously doing something wrong, and have narrowed the problem down to this bit of code: Dim gridrow As DataRowView Dim intItemFoundOnRow As Integer = bindingDataGridView2.Find("File Name", strSearch) If intItemFoundOnRow <> -1 Then gridrow = bindingDataGridView2.Item(intItemFoundOnRow) gridrow.BeginEdit() gridrow.Item("Columns in Database") = CountColumnsInTable(strTableName) gridrow.EndEdit() End If
It isn't anything to do with the CountColumnsInTable function, because I can replace this line with: gridrow.Item("Columns in Database") = 9999
... and it makes no difference. I threw in .BeginEdit and .EndEdit in an attempt to get it to work, but these lines may as well not be there.
I'm struggling to work out how to iterate through treenodes. What I've done is programmatically created a TreeView, creating a (DatabaseName) header as follows: trvDbNameNormal = Me.TreeView1.Nodes.Add("DatabaseName", "Common tables: " & Me.cmbDatabases.Text.ToUpper, 0, 0)
The children (table names) within this node are created by: nodeTable = trvDbNameNormal.Nodes.Add(strTable, strTable, 1, 1)
What I want to do is iterate through these children to perform some SQL on the table names - but I can't figure out how to get the contents of these nodes.