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 Mike Lewis 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: *

  1. JWhyte

    Help with file system object

    How about trying the following: Set FSO = New FileSystemObject For Each fFile In FSO.GetFolder("Folder Name").Files If Left$(fFile.Name, 3) = "001" Then debug.print fFile.Name debug.print fFile.DateLastModified End If Next 'objItem HTH John Whyte...
  2. JWhyte

    How can I access a word document's title thro' VB?

    Asuming Word is running and you have a reference to Microsoft Word 8.0 Object Library in your VB project references: debug.print ActiveDocument.BuiltInDocumentProperties("Subject").value debug.print ActiveDocument.BuiltInDocumentProperties("Author").value .... etc HTH...
  3. JWhyte

    CSV files

    Can I offer another alternative using good old Scripting.FileSystemObject. Dim FSO As New FileSystemObject Dim tsOutput As TextStream Dim astrData() As String ' Array to hold data values Set tsOutput = FSO.CreateTextFile(&quot;<csv file&quot;) '# Perform the code to extract the data from...
  4. JWhyte

    Sending HTML Formatted EMAILS from VB

    For anybody who is interested I have come across a component called HTMLMailer by a company called OOPadelic that fulfills all the requirements I raised here. John Whyte jwhyte@skipton.co.uk
  5. JWhyte

    Want to export, change file permissions at DOS, then Email it

    I don't know if this is of any use to you but you might try the following: Add a reference to Microsoft Scripting Runtime in your VB Project the code the following to make the file Read-Only. Dim FSO As New FileSystemObject dim mFile As File Set mFile=FSO.GetFile(&quot;<file name&quot;>...
  6. JWhyte

    Sending HTML Formatted EMAILS from VB

    Michael, this is an example of what I have achieved so far. Please bare in mind OutLook Express is my default Mail program. In VB add component Microsoft MAPI Controls to your project. The add a MAPIMessages control to your form. Then code as follows: With MAPIMessages1 .Compose...
  7. JWhyte

    Sending HTML Formatted EMAILS from VB

    As far as I can tell there is no bodytype or contenttype property for the MAPI controls. So how would I do this? John Whyte jwhyte@skipton.co.uk
  8. JWhyte

    Sending HTML Formatted EMAILS from VB

    I am sure some enlightened person will be able to help me out with this, so here goes. I am attempting to write an application in VB that can send an EMAIL to any of my contacts in HTML format, rather like what can be achieved using Outlook Express. I have experiemented with MAPI controls and...
  9. JWhyte

    VBA File Exist commands?

    Or use Scripting.FileSystemObject. i.e. Dim FSO As FileSystemObject Set FSO = New FileSystemObject If FSO.FileExists(&quot;<path to file&quot;) Then ' Code on existence of file. End If HTH John Whyte jwhyte@skipton.co.uk
  10. JWhyte

    How do you display Access tables and fields?

    If you are using DAO use can use the TableDefs and Fields collections to list all the tables and fields. If using ADO, then you can use the OpenSchema method of the Connection object to display the same information. HTH John Whyte jwhyte@skipton.co.uk
  11. JWhyte

    Help needed using VB 6.0, to read .txt, .CVS file types - Oracle

    Mavrick, I also forgot to mention, if you want to read through multiple lines, the following code might help: ' Assume data is like following: ' Mavrick,1,22/02/2001 Dim FSO As New FileSystemObject Dim tsInput As TextStream dim varData As Variant Set tsInput =...
  12. JWhyte

    Help needed using VB 6.0, to read .txt, .CVS file types - Oracle

    Mavrick, you need to add a reference to 'Microsoft Scripting Runtime' in Project \References. John Whyte jwhyte@skipton.co.uk
  13. JWhyte

    comma-separated file & VB 6.0

    Possibly you could use ADO to create a Connection to the Oracle database. Then a RecordSet pointing to the Oracle table. A loop through adding new records followed by a Commit should do the trick. Hope this of use. John Whyte jwhyte@skipton.co.uk
  14. JWhyte

    Reading data from .txt or .cvs file via VB 6.0

    Alternatively you could use the FileSystemObject and the Split function. For example: ' Assuming the file contained the following: ' Smith, John, 45, 55000, Database Administrator Dim FSO As New FileSystemObject Dim tsInput As TextStream Dim varData As Variant set tsInput =...
  15. JWhyte

    Read Access Database in VB

    The following code will display all the 'Descriptions' for fields in a particular Access table. Dim adoConn as ADODB.Connection Dim adoRST as ADODB.Recordset set adoConn = New ADODB.Connection adoConn.Open &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; & CurrentDB.Name &...
  16. JWhyte

    Renaming Files in a Directory

    I don't know if this will help you but you might do the following: Dim FSO Dim mFile Dim strWork Set FSO = CreateObject(&quot;Scripting.FileSystemObject&quot;) For Each mFile In FSO.GetFolders(&quot;C:\Temp&quot;).Files strWork = Left(mFile.Path,Instr(1,mFile.Path,&quot;_&quot;)-1)...
  17. JWhyte

    &quot;ListBox&quot; Navigation Screen

    I think I understand what is you want to do. I believe you could do this with standard VB listboxes. I think the following steps might help. 1. Query the 'database' and extract all the major modules 2. Loop through the data returned from the Query and populate the first ListBox with the...
  18. JWhyte

    Word Document Properties

    Does anyone know a way of inspecting a Word Documents CustomDocumentProperties programmatically, without opening the document. I would like to create a script file that searches through a folder of Word Documents and pulls document property details, rather that opening each one in turn and...
  19. JWhyte

    Determine Temp Directory

    I generally use the following function: Environ. For example, dim strTemp as String strTemp = Environ(&quot;TEMP&quot;) Hope this is of use... John Whyte jwhyte@skipton.co.uk
  20. JWhyte

    Monitoring Folders

    Thanks for the link Eric. However, I was hoping someone out there might have had experience with actually calling the API from Visual Basic. As all my attempts so far have failed miserably :( I have had made attempts based on C programs (I am not however, totally familiary with C) pulled from...

Part and Inventory Search

Back
Top