Question

Value of Field Export into txt doc

Asked by: SussexDavid

Hello Chaps, i have a database that has a field which contains a value (comments) of which we need to be exported into a text doc. with the client name used as the name of the text doc The database contains approx 5,000 files all with the same field and all in need to be exported into a folder containing the text files. Within the database however, there are some clients with the same name, so there must be some code that identies this and puts say (1) at the end so there is no over writing.

Can anyone assist. Thanks

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-30 at 04:06:56ID24857624
Topic

Lotus Notes

Participating Experts
1
Points
500
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Exporting Data
    I am trying to research the best way to export Data and objects from one Oracle 8i DB to another. I have to keep in mind the constraints. How to I export or import roles?
  2. How to export docs with attachments from a view?
    I was asked to export all the docs from a view. I exported them to a txt file (type = CSV) and then to excel. It looks good. But now I was told that I should have exported them with the attachments. Is that possible to export the docs with the attachments to any type of prog...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mbonaciPosted on 2009-10-30 at 05:15:03ID: 25702135

Here is a start, you'll have to modify it to test for duplicates.
If you don't know how ask specifics and we'll help you...

Sub Initialize
	Dim s As New NotesSession
	Dim db As NotesDatabase
	Dim c As NotesDocumentCollection
	Dim cur As NotesDocument
	Dim valArr() As String
	Dim i As Integer
 
	Const filePath$ = "C:\text.txt"
 
	Set db = s.CurrentDatabase
	Set c = db.UnprocessedDocuments
 
	Set cur = c.GetFirstDocument()
	Do Until cur Is Nothing
		Redim Preserve valArr( i )
		valArr( i ) = cur.FieldName(0)		
		i = i + 1
	
		Set cur = c.GetNextDocument( cur )
	Loop
 
	Call WriteToFile( valArr, filePath$ )
 
End Sub
 
 
Sub WriteToFile( FnLinkList As Variant, fn As String )
	
	ScriptBugHack = FnLinkList
	
	Call NukeIt( fn$ )
	
	filenum% = Freefile()
	Open fn$ For Output As filenum%
	Forall i In ScriptBugHack
		Print #filenum%, i
	End Forall
	Close filenum%
	
End Sub
 
 
Sub NukeIt( fn As String )
	On Error Resume Next
	Kill fn$
	On Error Goto 0
End Sub

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:

Select allOpen in new window

 

by: mbonaciPosted on 2009-10-30 at 05:28:01ID: 25702229

I just saw you need separate file for each document.
Here's a modification:

Sub Initialize
	Dim s As New NotesSession
	Dim db As NotesDatabase
	Dim c As NotesDocumentCollection
	Dim cur As NotesDocument
 
	Const filePath$ = "C:\Clients\LotusOutput\"	'modify this
	Const commentField$ = "strComments"		'modify this
	Const clientNameField$ = "strClientName"	'modify this
 
	Set db = s.CurrentDatabase
	Set c = db.UnprocessedDocuments
 
	Set cur = c.GetFirstDocument()
	Do Until cur Is Nothing
 
                Call WriteToFile( Split( cur.GetItemValue( commentField$ )(0), "~" ), filePath$ & cur.GetItemValue( clientNameField$ )(0) )
 
		Set cur = c.GetNextDocument( cur )
	Loop
 
End Sub
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:

Select allOpen in new window

 

by: mbonaciPosted on 2009-10-30 at 06:00:16ID: 25702457

And here's how to check whether the file exists:
(copy and paste all this into script library, Declarations section)
Then, in your agent:

Use "yourScriptLibraryName"

And then just call:

If OSFileExist( "D:\Clients\LotusOutput\" & clientName ) Then ...

OK, wait, now that I made this far I'll incorporate it for you, in the next post...

Option Declare
 
Const NOERROR	= 0
Const MAXPATH	= 256
 
'these are OUR OWN platform definitions queriable via IsOSPlatform()
Const PLATFORM_32BIT		= "32BIT"
Const PLATFORM_64BIT		= "64BIT"
 
Const PLATFORM_OS400		= "IBM OS/400"
Const PLATFORM_OS390		= "IBM OS/390"
 
Const PLATFORM_MACINTEL	= "Macintosh/Intel"
Const PLATFORM_MACPPC	= "Macintosh/PowerPC"
Const PLATFORM_MAC			= PLATFORM_MACINTEL + PLATFORM_MACPPC
 
Const PLATFORM_LINUX32	= "Linux/32"
Const PLATFORM_LINUX64	= "Linux/64"
Const PLATFORM_ZLINUX		= "LINUX ZSERIES"
Const PLATFORM_LINUX		= PLATFORM_LINUX32 + PLATFORM_LINUX64 + PLATFORM_ZLINUX
 
Const PLATFORM_SOLARIS32	= "SOLARIS/32"
Const PLATFORM_SOLARIS64	= "SOLARIS/64"
Const PLATFORM_SOLARIS		= PLATFORM_SOLARIS32 + PLATFORM_SOLARIS64
 
Const PLATFORM_AIX32		= "AIX/32"
Const PLATFORM_AIX64		= "AIX/64"
Const PLATFORM_AIX			= PLATFORM_AIX32 + PLATFORM_AIX64
 
Const PLATFORM_WIN32		= "WIN/32"
Const PLATFORM_WIN64		= "WIN/64"
Const PLATFORM_WIN			= PLATFORM_WIN32 + PLATFORM_WIN64
 
Const PLATFORM_WINNT4	= "4.0"
Const PLATFORM_WIN2K		= "5.0"
Const PLATFORM_WINXP		= "5.1"
Const PLATFORM_WIN2K3	= "5.2"
Const PLATFORM_WINVISTA	= "6.0"
Const PLATFORM_TIGER		= "10.4"
Const PLATFORM_LEOPARD	= "10.5"
 
'from inc\global.h:	(these values are returned by @Platform and NotesSession.Platform)
Private Const OS_OS400		= "OS/400"
Private Const OS_UNIX			= "UNIX"
Private Const OS_WIN32		= "Windows/32"
Private Const OS_WIN64		= "Windows/64"
Private Const OS_AIX64			= "AIX/64"
Private Const OS_LINUX64		= "Linux/64"
Private Const OS_SOLARIS64	= "Solaris/64"
Private Const OS_MAC			= "Macintosh"
 
'from inc\oskernel.h: (these values are returned by @Platform([Specific])
Private Const OSS_WINNT			= "Windows/NT"
Private Const OSS_OS400			= "IBM OS/400"
Private Const OSS_OS390			= "IBM OS/390"
Private Const OSS_ZLINUX			= "Linux for zSeries"
Private Const OSS_LINUX32		= "Linux"
Private Const OSS_LINUX64		= "Linux/64"
Private Const OSS_AIX32			= "AIX"
Private Const OSS_AIX64			= "AIX/64"
Private Const OSS_SOLARIS32	= "SOLARIS Sparc"
Private Const OSS_SOLARIS64	= "SOLARIS/64 Sparc"
Private Const OSS_MACINTEL		= "Macintosh/Intel"
Private Const OSS_MACPPC		= "Macintosh/PowerPC"
 
Private Const LIB_WIN		= "nnotes.dll"
Private Const LIB_MAC		= "Notes"
Private Const LIB_AIX		= "libnotes_r.a"
Private Const LIB_ZOS		= "libnotes"
Private Const LIB_UNIX		= "libnotes.so"
Private Const LIB_OS400	= "LIBNOTES.SRVPGM"
Private Const LIB_OS390	= LIB_ZOS
 
 
 
 
 
 
Declare Function WIN_OSFileExistCheck Lib LIB_WIN Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
Declare Function MAC_OSFileExistCheck Lib LIB_MAC Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
Declare Function AIX_OSFileExistCheck Lib LIB_AIX Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
Declare Function UNIX_OSFileExistCheck Lib LIB_UNIX Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
Declare Function OS400_OSFileExistCheck Lib LIB_OS400 Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
Declare Function OS390_OSFileExistCheck Lib LIB_ZOS Alias "OSFileExistCheck" (Byval PathName As Lmbcs String, isDir As Integer) As Integer
 
Function OSIsPlatform(sQueryOSPlatform As String) As Boolean
	
	'This function returns TRUE if the queried PLATFORM_xxx is currently running
	
	On Error Goto ERROR_HANDLER
	
	Dim vOSPlatform	As Variant
	Dim vOSSpecific	As Variant
	
	Static sOSPlatform	As String
	Static sOSSpecific	As String
	Static sOSVersion	As String
	Static IsComputed	As Boolean
	Static Is64Bit	As Boolean
	
	'do this only once	
	If IsComputed	= False Then
		
		vOSPlatform	= Evaluate(|@Platform|)
		vOSSpecific	= Evaluate(|@Platform([Specific])|)
		
		sOSPlatform	= vOSPlatform(0)
		sOSSpecific	= vOSSpecific(0)
		
		If Ubound(vOSSpecific) = 1 Then
			sOSVersion = vOSSpecific(1)
		End If
		
		'check for 64bit
		If (sOSPlatform = OS_WIN64) _
		Or (sOSPlatform = OS_AIX64) _
		Or (sOSPlatform = OS_LINUX64) _
		Or (sOSPlatform = OS_SOLARIS64) Then
			Is64Bit = True
		End If
		
		IsComputed = True
		
	End If
	
	Select Case sQueryOSPlatform
		
	Case PLATFORM_32BIT:		If Is64Bit = False			Then OSIsPlatform = True	
	Case PLATFORM_64BIT:		If Is64Bit = True			Then OSIsPlatform = True			
		
	Case PLATFORM_OS400:		If sOSSpecific = OSS_OS400		Then OSIsPlatform = True
	Case PLATFORM_OS390:		If sOSSpecific = OSS_OS390		Then OSIsPlatform = True
		
	Case PLATFORM_MACINTEL:	If sOSSpecific = OSS_MACINTEL						Then OSIsPlatform = True
	Case PLATFORM_MACPPC:	If sOSSpecific = OSS_MACPPC							Then OSIsPlatform = True
	Case PLATFORM_MAC:		If (sOSSpecific = OSS_MACINTEL) Or (sOSSpecific = OSS_MACPPC)		Then OSIsPlatform = True
		
	Case PLATFORM_TIGER:		If (sOSPlatform = OS_MAC) And (Instr(1, sOSVersion, PLATFORM_TIGER, 5)) > 0 	Then OSIsPlatform = True
	Case PLATFORM_LEOPARD:	If (sOSPlatform = OS_MAC) And (Instr(1, sOSVersion, PLATFORM_LEOPARD, 5)) > 0 	Then OSIsPlatform = True
		
	Case PLATFORM_LINUX32:	If sOSSpecific = OSS_LINUX32			Then OSIsPlatform = True
	Case PLATFORM_LINUX64:	If sOSSpecific = OSS_LINUX64			Then OSIsPlatform = True
	Case PLATFORM_ZLINUX:	If sOSSpecific = OSS_ZLINUX				Then OSIsPlatform = True
	Case PLATFORM_LINUX:		If (sOSSpecific = OSS_LINUX32) Or (sOSSpecific = OSS_LINUX64) Or (sOSSpecific = OSS_ZLINUX) Then OSIsPlatform = True
		
	Case PLATFORM_SOLARIS32:	If sOSSpecific = OSS_SOLARIS32						Then OSIsPlatform = True
	Case PLATFORM_SOLARIS64:	If sOSSpecific = OSS_SOLARIS64						Then OSIsPlatform = True
	Case PLATFORM_SOLARIS:	If (sOSSpecific = OSS_SOLARIS32) Or (sOSSpecific = OSS_SOLARIS64)	Then OSIsPlatform = True
		
	Case PLATFORM_AIX32:		If sOSSpecific = OSS_AIX32						Then OSIsPlatform = True
	Case PLATFORM_AIX64:		If sOSSpecific = OSS_AIX64						Then OSIsPlatform = True
	Case PLATFORM_AIX:		If (sOSSpecific = OSS_AIX32) Or (sOSSpecific = OSS_AIX64)	Then OSIsPlatform = True
		
	Case PLATFORM_WIN32:		If sOSPlatform = OS_WIN32						Then OSIsPlatform = True
	Case PLATFORM_WIN64:		If sOSPlatform = OS_WIN64						Then OSIsPlatform = True
	Case PLATFORM_WIN:		If (sOSPlatform = OS_WIN32) Or (sOSPlatform = OS_WIN64)	Then OSIsPlatform = True
		
	Case PLATFORM_WINNT4:	If (sOSSpecific = OSS_WINNT)	And (sOSVersion = PLATFORM_WINNT4)	Then OSIsPlatform = True
	Case PLATFORM_WIN2K:		If (sOSSpecific = OSS_WINNT)	And (sOSVersion = PLATFORM_WIN2K)	Then OSIsPlatform = True
	Case PLATFORM_WINXP:		If (sOSSpecific = OSS_WINNT)	And (sOSVersion = PLATFORM_WINXP)	Then OSIsPlatform = True
	Case PLATFORM_WIN2K3:	If (sOSSpecific = OSS_WINNT)	And (sOSVersion = PLATFORM_WIN2K3)	Then OSIsPlatform = True
		
	End Select
	
	Exit Function
	
ERROR_HANDLER:
	
	'Call oException.RaiseError(MODULE_NAME, "", sQueryOSPlatform)
	
End Function
Function OSFileExist(sFilePath As String) As Boolean
	
	On Error Goto ERROR_HANDLER
	
	Dim iStatus	As Integer
	Dim iFolder	As Integer
	
	If OSIsPlatform(PLATFORM_WIN) Then
		iStatus = WIN_OSFileExistCheck(sFilePath, iFolder)
		
	Elseif OSIsPlatform(PLATFORM_MAC) Then
		iStatus = MAC_OSFileExistCheck(sFilePath, iFolder)
		
	Elseif OSIsPlatform(PLATFORM_AIX) Then
		iStatus = AIX_OSFileExistCheck(sFilePath, iFolder)
		
	Elseif OSIsPlatform(PLATFORM_OS400) Then
		iStatus = OS400_OSFileExistCheck(sFilePath, iFolder)
		
	Elseif OSIsPlatform(PLATFORM_OS390) Then
		iStatus = OS390_OSFileExistCheck(sFilePath, iFolder)
		
	Else
		iStatus = UNIX_OSFileExistCheck(sFilePath, iFolder)
	End If
	
	If iFolder = 0 Then
		If iStatus = NOERROR Then
			OSFileExist = True
		End If	
	End If
	
	Exit Function
	
ERROR_HANDLER:
	
	'Call oException.RaiseError(MODULE_NAME, "", sFilePath)	
	
End Function

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:

Select allOpen in new window

 

by: SussexDavidPosted on 2009-10-30 at 06:01:50ID: 25702473

thank you for this, is almost there, what it does not do is create seperate txt fields for each field value and does not write the client name field as the title of the text doc, nor does it save the text file into a folder with a safe guard for over writting.

:-)

 

by: mbonaciPosted on 2009-10-30 at 06:21:26ID: 25702640

Here you are, try this:

 

by: mbonaciPosted on 2009-10-30 at 06:29:03ID: 25702707

Solved append and file extension problems:

 

by: SussexDavidPosted on 2009-10-30 at 07:08:49ID: 25703069

Thank you for that, at present if the code comes up against a duplicate contact name it does not write the other file and only only text file is created and saved.

 

by: mbonaciPosted on 2009-10-30 at 07:44:35ID: 25703427

When it founds exactly the same name (case included in comparison) it appends to txt file.

What do you mean by this:
 > and only only text file is created and saved.

 

by: SussexDavidPosted on 2009-10-30 at 07:55:20ID: 25703562

Hello mbonaci
I would much prefer if a new document is created it a duplicate is found, as there are many duplicates in the database.

Thanks

 

by: mbonaciPosted on 2009-10-30 at 08:11:33ID: 25703733

So modify the code, I'll help you when you get stuck, this is not "RentACoder" after all...

 

by: SussexDavidPosted on 2009-10-30 at 08:17:23ID: 25703803

i would if i knew how!

 

by: mbonaciPosted on 2009-10-30 at 08:30:49ID: 25703939

OK,
it's even more simple to do it like you requested.
You don't even need script library.

Sub Initialize
	Dim s As New NotesSession
	Dim db As NotesDatabase
	Dim c As NotesDocumentCollection
	Dim cur As NotesDocument
	Dim clients List As Integer
	Dim clientName As String, fileName As String
	
	Const filePath$ = "D:\LotusOutput\"			'modify this
	Const commentField$ = "Form"				'modify this
	Const clientNameField$ = "Form"				'modify this
	
	Set db = s.CurrentDatabase
	Set c = db.UnprocessedDocuments
	
	Set cur = c.GetFirstDocument()
	Do Until cur Is Nothing
		clientName = cur.GetItemValue( clientNameField$ )(0)		
		
		If Iselement( clients( clientName ) ) Then				'client with that name has already been processed?
			clients( clientName ) = clients( clientName ) + 1		'increment file name counter
			fileName = filePath$ & clientName & "_" & clients( clientName ) & ".txt"
			Call WriteToFile( cur.GetItemValue( commentField$ )(0), fileName, True )
		Else
			clients( clientName ) = 0
			fileName = filePath$ & clientName & ".txt"
			Call WriteToFile( cur.GetItemValue( commentField$ )(0), fileName, True )
		End If
		
		Set cur = c.GetNextDocument( cur )
	Loop
	
End Sub

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:

Select allOpen in new window

 

by: SussexDavidPosted on 2009-10-30 at 08:56:06ID: 31647937

Many thanks

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...