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...
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...
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("<csv file")
'# Perform the code to extract the data from...
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
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("<file name">...
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...
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...
Or use Scripting.FileSystemObject.
i.e.
Dim FSO As FileSystemObject
Set FSO = New FileSystemObject
If FSO.FileExists("<path to file") Then
' Code on existence of file.
End If
HTH John Whyte
jwhyte@skipton.co.uk
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
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 =...
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
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 =...
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 "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurrentDB.Name &...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.