Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: qjd2004
  • Order by date
  1. qjd2004

    Connecting to IMAP folder in Outlook 98 through Excel VBA

    Latest Code is better, uses Arrays to loop through the emails and add to an access recordset: Public Sub GetEmailADO() Dim conn As ADODB.Connection Dim rs1 As ADODB.Recordset Dim objOL As Outlook.Application Dim olNS As Outlook.NameSpace Dim objFolder As Outlook.MAPIFolder Dim ObjSubFolder As...
  2. qjd2004

    Get Sender's address using VBA

    That's a real pain! But I've a feeling that you're right old chap. I've not had any further success on it either. Is it possible to download the contents of an enterprise address book to a local contacts folder so I can access it?
  3. qjd2004

    Get Sender's address using VBA

    Hiya, I'm saving emails from outlook to an Access DB using VBA. I'm trying to get the sender's email address from emails. We're on IMAP here and the enterprise address book does not show up in Outlook. I tried using ADO/ADOX to connect to it like a table and it doesn't seem to want to play...
  4. qjd2004

    populate list box with recordset

    Hi Tran, thanks for all your assistance man! I've gone with the autosize suggestion, the headers I'm leaving for now. Boy, I gotta learn how to use datagrids man! Many thanks for all your help on this. A well deserved stars on it's way! Q
  5. qjd2004

    Connecting to IMAP folder in Outlook 98 through Excel VBA

    I got there in the end! Thanks anyway! Public Sub RipEmail() Dim conn As ADODB.Connection Dim rs1 As ADODB.Recordset Dim objOL As Outlook.Application Dim olNS As Outlook.NameSpace Dim objFolder As Outlook.MAPIFolder Dim ObjSubFolder As Outlook.MAPIFolder Dim myMailItem As Outlook.MailItem...
  6. qjd2004

    populate list box with recordset

    Also, another quick question: How do I include column headings as well as autosize? I'm aware of a .CoulumnHeads property, but this is a boolean and I can't see any other way of doing it. When I try to set RowSourceType property from the code I don't know what value to assign to it?
  7. qjd2004

    populate list box with recordset

    Hi Tranman, Thanks for your assist, it works perfectly! I've modified to check for nulls. rs.Open strSQL, con, adOpenDynamic, adLockOptimistic UserForm6.DisplayBox.ColumnCount = rs.Fields.Count Do While Not rs.EOF UserForm6.DisplayBox.AddItem For intCol = 0 To...
  8. qjd2004

    Connecting to IMAP folder in Outlook 98 through Excel VBA

    Hiya, With VBA, I'm trying to retrieve messages from an IMAP folder in Outlook 98 (the sub runs from Excel 2002 though). I can get the string name of the IMAP Root folder! Like this Set objOL = New Outlook.Application Set olNS = objOL.GetNamespace("MAPI") Set objFolder = olNS.Folders.Item(1) y...
  9. qjd2004

    populate list box with recordset

    Hiya, I'll have a look at .RowSourceType = "Value List" later on 2day. meanwhile, here's my spec: Microsoft XP Professional 5.1.2600 Service Pack1 Build 2600 Microsoft Excel 2002 (10.4302.4219) Service Pack2 ListBox type is "Microsoft Forms 2.0 ListBox" In the Data Section of Properties for...
  10. qjd2004

    populate list box with recordset

    Sorry, I just can't find it. I can change this in the code though I guess: With UserForm6.DisplayBox .RowSourceType = whatever End With Can you tell me how to add the column headings? I know there is a value for rs.Fields(Col).Name, how do I assign that to the columns...
  11. qjd2004

    populate list box with recordset

    I'm sorry. I think I'm being so stupid, but there's no Row Source Type option in the properties box for my list box. :(
  12. qjd2004

    populate list box with recordset

    Hi, I'm using VBA and not VB6. The "Row Source" option in the properties window for the ListBox accepts text but has no presets and nothing happens when I double click on it. Setting the default column count is ok though. Any suggestion what I'm doing wrong?
  13. qjd2004

    populate list box with recordset

    Tranman, Thanks for getting back to me. I'm having some trouble implementing your suggestions. It's a problem for me to have the right number of columns defined for the listbox, as the user can specify the SQL query that builds the recordset (therefore the number of colunms can change a lot)...
  14. qjd2004

    populate list box with recordset

    Hiya, Using VBA, I'm trying to fill a list box with the contents of a recordset. I'm being a thick as it's putting each field from the rset into a new item on this list. How do you put each field into a new column ??? ReDim Arr(1 To rs.Fields.Count - 1) ReDim Lbox(1 To...
  15. qjd2004

    How to conect to Access db with a password

    Hiya, no that doesn't work. I'm using this con string: con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mdb & _ ";Persist Security info=False;Jet OLEDB:" & _ "System Database=system.mdw;" & _ "Password=pw;User ID=Admin" But I get either workgroup information...
  16. qjd2004

    How to conect to Access db with a password

    Hiya, trying to connect to an access db that is password protected. I get a runtime error that says "Cannot start your application. The workgroup information file is missing or opened exclusively by another user" The db in question is not open and the workgroup file is not missing, it's where...
  17. qjd2004

    Updating records using ADO

    Thanks Roy, That's a massive help actually. I've implemented some of your suggestions and things are working , and quicker! I appreciate the background info as well, it's a big help to me as I've no formal training at all. Much of the theory is new to me as I'm learning bit by bit, mainly...
  18. qjd2004

    Updating records using ADO

    That's exactly what I was after, thank you. How can I Do the same but update 2 other recordsets (choosing which one to update depending on the value of the rectype field)? I've adapted your code to delete in 1 of 2 tables. I now need to insert these records in 1 of 2 tables/recordsets, but I...
  19. qjd2004

    Updating records using ADO

    Hiya, I'm trying to loop through every row in a recordset and if the field rectype = 2 then execute some SQL on another SEPERATE ADO connection that deletes all rows from a table. For the row in the recordset that has the rectype of 2, I want to get the value of field "DistID" and use that in...
  20. qjd2004

    How to use ODBC to get data from Access through Excel VBA

    I have a feeling I've answered the 1st part of this question myself! I just copied the Access type library from a machine where it was installed, registered it and the connection opens and the data comes through! I'm not sure this is the correct way of doing it however, and I do get a...

Part and Inventory Search

Back
Top