• 0

Need help on a vbscript using loop count in variable name


Question

Hello, 

 

I need to utilize a loop count as part of a variable name within vbscript.  For the life of me, I cannot figure it out.

For example, below I need objrecord1, objrecord2, etc.

for each q in FILE 
Set objrecord + q needed here = xmlDoc.createElement("document")  
objRecord0.appendchild objrecord +q

Much Thanks!

4 answers to this question

Recommended Posts

  • 0

I'm confused, why can't you just use a regular for loop instead of a foreach or if you need the foreach (for each line of the file), why can't you create a variable and increment it yourself?

  • 0
  On 14/03/2014 at 23:30, snaphat (Myles Landwehr) said:

I'm confused, why can't you just use a regular for loop instead of a foreach or if you need the foreach (for each line of the file), why can't you create a variable and increment it yourself?

FILE  is an array, populated by a comma del string from third party software.  

 

The real problem comes down to objrecord.  It is within a loop and will error on the second instance as it already exists.  I don't believe I can set it to nothing, then loop.  The entire script is building an xml, which saves at the end.  

 

What does work is objrecord1, objrecord2, etc. I tested this by removing the loop and writing two document entries. However, the loop contains a good 100 lines of code for index fields per doc and we expect anywhere from 2 to 15 documents.

  • 0

This code works (one document code shown, minus 90% of the indexes).  For document 2, I would need to increase the value of each objrecord which has a value at its end (Else, the entry is either applied to the wrong place or overwrites).  So document 2 would need objrecord4,5, & 6, etc.

Sub XMLBuilder1_OnLoad
	Set xmlDoc = CreateObject("Microsoft.XMLDOM")
	
	Set objRoot = xmlDoc.createElement("batch")  
	xmlDoc.appendChild objRoot
	
	'' -- start of header -- ''
	
	Set objRecord = xmlDoc.createElement("header")  
	objRoot.appendChild objRecord
	
	Set objName = xmlDoc.createElement("batchid")  
	objName.Text = "" & KOID
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("date")  
	objName.Text = "1/1/2014"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("user")  
	objName.Text = "ABC"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("docbase")  
	objName.Text = "DEF"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("source")  
	objName.Text = "Outlook"
	objRecord.appendChild objName
	
	'' -- end of header - start body section -- ''
	
	Set objRecord0 = xmlDoc.createElement("body")  
	objRoot.appendchild objRecord0
	
	If File_Count > 0 Then '' create first document

		Set objrecord1 = xmlDoc.createElement("document")  
		objRecord0.appendchild objrecord1
		
		Set objName = xmlDoc.createElement("name")
		objName.Text = "NEW-" &Date_Requested &"-" &Country &"." &Ext1
		objRecord1.appendChild objName
		
		Set objName = xmlDoc.createElement("path")  
		objName.Text = "/ACTIVE"
		objRecord.appendChild objName
		
		'' -- Doctype level data -- ''
		Set objrecord2 = xmlDoc.createElement("doctype")  
		objRecord1.appendchild objRecord2
		
		Set objName = xmlDoc.createElement("tname")  
		objName.Text = "lcif2"
		objRecord2.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objrecord2.appendchild objrecord
		
		
		'' -- begin content section here -- ''
		
		Set objrecord3 = xmlDoc.createElement("content")  
		objrecord1.appendchild objRecord3
		
		Set objrecord = xmlDoc.createElement("file")  
		objrecord3.appendchild objRecord
		
		Set objName = xmlDoc.createElement("fname")
		objName.Text = "" &File1 
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("format")
		objName.Text = "" & Ext1
		objRecord.appendChild objName
		
		end if
		
	xmlDoc.Save "C:\Send to upload\Upload\LCIF\" & KOID & "\batch.xml"
End Sub

This is code for one of four doctypes.  My goal is to combine all four into one code, and accept infinite number of documents, but I'm stuck at how to apply the x,y,z values into the variable.  This is the full code I'm stuck on:

Sub XMLBuilder_ALL_OnLoad
	Set xmlDoc = CreateObject("Microsoft.XMLDOM")
	
	Set objRoot = xmlDoc.createElement("batch")  
	xmlDoc.appendChild objRoot


	'' -- BUILD ARRAYS -- ''
	FILE = ARRAY( ""&FILES )
	EXT = ARRAY( ""&EXT )
	EXT2 = ARRAY( ""&EXT )


	'' -- DATA CLEAN UP --''
	if JOB = "Data Adjustment" or JOB = "Replacement Recognition" then 
		Date_Requested = Replace(Date_Requested,"/","")
	end if
	if JOB <> "Replacement Recognition" then
		Date_Needed = Replace(Date_Needed,"/","")
	end if
	if JOB <> "Data Adjustment" then
		Date_Received = Replace(Date_Received,"/","")
	end if


	'' -- EXTENSION CLEANUP
	for each x in EXT2
		EXT(x) = replace(EXT(x),".","")
		EXT2(x) = replace(EXT2(x),".","")
		if EXT2(x) = "html" then EXT2(x) = "htm"
		if EXT2(x) = "docx" then EXT2(x) = "msw12"
		if EXT2(x) = "doc" then EXT2(x) = "msw8"
		if EXT2(x) = "xls" then EXT2(x) = "excel8book"
		if EXT2(x) = "xlsx" then EXT2(x) = "excel12book"
		if EXT2(x) = "txt" then EXT2(x) = "crtext"
		if EXT2(x) = "jpg" then EXT2(x) = "jpeg"
		if EXT2(x) = "ppt" then EXT2(x) = "ppt8"
		if EXT2(x) = "docx" then EXT2(x) = "msw12"
		if EXT2(x) = "wpd" then EXT2(x) = "wp8"
		if EXT2(x) = "psd" then EXT2(x) = "photoshop6"
		if EXT2(x) = "au" then EXT2(x) = "audio"
		if EXT2(x) = "ai" then EXT2(x) = "illustrator10"
	next

	
	'' -- start of header -- ''
	
	Set objRecord = xmlDoc.createElement("header")  
	objRoot.appendChild objRecord
	
	Set objName = xmlDoc.createElement("batchid")  
	objName.Text = "" & KOID
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("date")  
	objName.Text = "1/1/2014"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("user")  
	objName.Text = "karora"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("docbase")  
	objName.Text = "LCIF"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("source")  
	objName.Text = "Outlook"
	objRecord.appendChild objName
	
	'' -- end of header - start body section -- ''
	
	Set objRecord0 = xmlDoc.createElement("body")  
	objRoot.appendchild objRecord0


	x=1
	y=2
	z=3	
	for each q in FILE 


		Set objrecord(x) = xmlDoc.createElement("document")  
		objRecord0.appendchild objrecord(x)
		
		Set objName = xmlDoc.createElement("name")
		if JOB = "Data Adjustment" then objName.Text = "NEW-" &Date_Requested &"-" &Country &"." &EXT(q)
		if JOB = "Pending Donation" then objName.Text = "NEW-" &Country &"-" &Date_Received &"." &EXT(q)
		if JOB = "Pending Recognition" then objName.Text = "NEW-" &Country &"-" &State &"-" &Date_Received &"." &EXT(q)
		if JOB = "Replacement Recognition" then objName.Text = "NEW-" &Date_Requested &"-" &Country &"." &EXT(q)
		objRecord(x).appendChild objName
		
		Set objName = xmlDoc.createElement("title")  
		objName.Text = ""
		objRecord(x).appendChild objName
		
		Set objName = xmlDoc.createElement("desc")  
		objName.Text = ""
		objRecord(x).appendChild objName
		
		Set objName = xmlDoc.createElement("keywords")  
		objName.Text = ""
		objRecord(x).appendChild objName
		
		Set objName = xmlDoc.createElement("authors")  
		objName.Text = "karora"
		objRecord(x).appendChild objName
		
		Set objName = xmlDoc.createElement("securitykey")  
		objName.Text = "LCIF"
		objRecord(x).appendChild objName
		
		Set objrecord = xmlDoc.createElement("folderlinks")  
		objRecord(x).appendchild objRecord
		
		Set objName = xmlDoc.createElement("path")  
		objName.Text = "/ACTIVE"
		objRecord.appendChild objName
		
		'' -- Doctype level data -- ''
		Set objrecord(y) = xmlDoc.createElement("doctype")  
		objRecord(x).appendchild objRecord(y)
		
		Set objName = xmlDoc.createElement("tname")  
		objName.Text = "lcif2"
		objRecord(y).appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objrecord(y).appendchild objrecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "DocumentCategory"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "Pending"
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objrecord(y).appendchild objrecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "StatusCode"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "New"
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objRecord(y).appendchild objRecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "DocClass"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "" &JOB
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objRecord(y).appendchild objRecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "Country"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = ""&Country
		objRecord.appendChild objName
		
		if JOB <> "Replacement Recognition" then
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Needed"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Needed
			objRecord.appendChild objName

			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		end if
		
		if JOB = "Data Adjustment" or JOB = "Replacement Recognition" then	
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Requested"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Requested
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		end if

		if JOB <> "Data Adjustment" then	
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Received"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Received
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		end if

		if JOB = "Pending Recognition" then	
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "State"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&State
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		end if

		if JOB = "Data Adjustment" then	

			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Order ID"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" & Order_ID
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "LCIFBatch"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Batch_ID
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Type of Adjustment"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Type_Of_Adjustment
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Correct Data To"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Correct_Data_To
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objRecord(y).appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Notes"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Notes
			objRecord.appendChild objName
		end if
			'' -- begin content section here -- ''
		
		Set objrecord(z) = xmlDoc.createElement("content")  
		objrecord(x).appendchild objRecord(z)
		
		Set objrecord = xmlDoc.createElement("file")  
		objrecord(z).appendchild objRecord
		
		Set objName = xmlDoc.createElement("fname")
		objName.Text = "" &FILE(q) 
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("format")
		objName.Text = "" & EXT2(q)
		objRecord.appendChild objName

	x=x+3
	y=y+3
	z=z+3
		
	next
	
	xmlDoc.Save "C:\Send to Docmall\Upload\LCIF\" & KOID & "\batch.xml"
End Sub
 
  • 0

I figured it out....

Sub XMLBuilder_ALL_OnLoad
	Set xmlDoc = CreateObject("Microsoft.XMLDOM")
	
	Set objRoot = xmlDoc.createElement("batch")  
	xmlDoc.appendChild objRoot


	'' -- BUILD ARRAYS -- ''
	FILE = split(""&FILES,",")
	EXT = split (""&EXT,",")
	EXT2 = EXT
	
	''-- convert array EXT2 for Documentum -- ''
	For q = 0 To ubound(EXT2)
		If EXT2(q) = ".pdf" Then EXT2(q) = "pdf"
		If EXT2(q) = ".html" Then EXT2(q) = "htm"
		If EXT2(q) = ".docx" Then EXT2(q) = "msw12"
		If EXT2(q) = ".doc" Then EXT2(q) = "msw8"
		If EXT2(q) = ".xls" Then EXT2(q) = "excel8book"
		If EXT2(q) = ".xlsx" Then EXT2(q) = "excel12book"
		If EXT2(q) = ".txt" Then EXT2(q) = "crtext"
		If EXT2(q) = ".jpg" Then EXT2(q) = "jpeg"
		If EXT2(q) = ".ppt" Then EXT2(q) = "ppt8"
		If EXT2(q) = ".pptx" Then EXT2(q) = "ppt12"
		If EXT2(q) = ".wpd" Then EXT2(q) = "wp8"
		If EXT2(q) = ".psd" Then EXT2(q) = "photoshop6"
		If EXT2(q) = ".au" Then EXT2(q) = "audio"
		If EXT2(q) = ".ai" Then EXT2(q) = "illustrator10" 
	Next

	'' -- DATA CLEAN UP --''
	If JOB = "Data Adjustment" Or JOB = "Replacement Recognition" Then 
		Date_Requested = Replace(Date_Requested,"/","")
	End If
	If JOB <> "Replacement Recognition" Then
		Date_Needed = Replace(Date_Needed,"/","")
	End If
	If JOB <> "Data Adjustment" Then
		Date_Received = Replace(Date_Received,"/","")
	End If
	
	'' -- start of header -- ''
	
	Set objRecord = xmlDoc.createElement("header")  
	objRoot.appendChild objRecord
	
	Set objName = xmlDoc.createElement("batchid")  
	objName.Text = "" & KOID
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("date")  
	objName.Text = "1/1/2014"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("user")  
	objName.Text = "karora"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("docbase")  
	objName.Text = "LCIF"
	objRecord.appendChild objName
	
	Set objName = xmlDoc.createElement("source")  
	objName.Text = "Outlook"
	objRecord.appendChild objName
	
	'' -- end of header - start body section -- ''
	
	Set objRecord0 = xmlDoc.createElement("body")  
	objRoot.appendchild objRecord0

	For q = 0 To ubound(FILE)

		Set objdoc = xmlDoc.createElement("document")
		objRecord0.appendchild objdoc

		Set objName = xmlDoc.createElement("name")
		If JOB = "Data Adjustment" Then objName.Text = "NEW-" &Date_Requested &"-" &Country &EXT(q)
		If JOB = "Pending Donation" Then objName.Text = "NEW-" &Country &"-" &Date_Received &EXT(q)
		If JOB = "Pending Recognition" Then objName.Text = "NEW-" &Country &"-" &State &"-" &Date_Received &EXT(q)
		If JOB = "Replacement Recognition" Then objName.Text = "NEW-" &Date_Requested &"-" &Country &EXT(q)
		ObjName.text = replace(ObjName.text,".html",".htm")
		objdoc.appendChild objName
		
		Set objName = xmlDoc.createElement("title")  
		objName.Text = ""
		objdoc.appendChild objName
		
		Set objName = xmlDoc.createElement("desc")  
		objName.Text = ""
		objdoc.appendChild objName
		
		Set objName = xmlDoc.createElement("keywords")  
		objName.Text = ""
		objdoc.appendChild objName
		
		Set objName = xmlDoc.createElement("authors")  
		objName.Text = "karora"
		objdoc.appendChild objName
		
		Set objName = xmlDoc.createElement("securitykey")  
		objName.Text = "LCIF"
		objdoc.appendChild objName
		
		Set objrecord = xmlDoc.createElement("folderlinks")  
		objdoc.appendchild objRecord
		
		Set objName = xmlDoc.createElement("path")  
		objName.Text = "/ACTIVE"
		objRecord.appendChild objName
		
		'' -- Doctype level data -- ''
		Set objtype = xmlDoc.createElement("doctype")  
		objdoc.appendchild objtype
		
		Set objName = xmlDoc.createElement("tname")  
		objName.Text = "lcif2"
		objtype.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objtype.appendchild objrecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "DocumentCategory"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "Pending"
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objtype.appendchild objrecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "StatusCode"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "New"
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objtype.appendchild objRecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "DocClass"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = "" &JOB
		objRecord.appendChild objName
		
		Set objrecord = xmlDoc.createElement("index")  
		objtype.appendchild objRecord
		
		Set objName = xmlDoc.createElement("iname")  
		objName.Text = "Country"
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("ivalue")  
		objName.Text = ""&Country
		objRecord.appendChild objName
		
		If Not (JOB = "Replacement Recognition") Then
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Needed"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Needed
			objRecord.appendChild objName

			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		End If
		
		
		
		If JOB = "Data Adjustment" Or JOB = "Replacement Recognition" Then
			
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
			
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Requested"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Requested
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		End If

		If JOB <> "Data Adjustment" Then
			
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
			
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Date Received"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&Date_Received
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		End If

		If JOB = "Pending Recognition" Then	
			
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
			
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "State"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = ""&State
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		End If

		If JOB = "Data Adjustment" Then	
			
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
			
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Order ID"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" & Order_ID
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "LCIFBatch"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Batch_ID
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Type of Adjustment"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Type_Of_Adjustment
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Correct Data To"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Correct_Data_To
			objRecord.appendChild objName
		
			Set objrecord = xmlDoc.createElement("index")  
			objtype.appendchild objRecord
		
			Set objName = xmlDoc.createElement("iname")  
			objName.Text = "Notes"
			objRecord.appendChild objName
		
			Set objName = xmlDoc.createElement("ivalue")  
			objName.Text = "" &Notes
			objRecord.appendChild objName
		End If
		'' -- begin content section here -- ''
		
		Set objcont = xmlDoc.createElement("content")  
		objdoc.appendchild objcont
		
		Set objrecord = xmlDoc.createElement("file")  
		objcont.appendchild objRecord
		
		Set objName = xmlDoc.createElement("fname")
		objName.Text = "" &FILE(q) 
		objRecord.appendChild objName
		
		Set objName = xmlDoc.createElement("format")
		objName.Text = "" & EXT2(q)
		objRecord.appendChild objName

		Set objcont = Nothing
		Set objdoc = Nothing
		Set objtype = Nothing
		
	Next
	
	xmlDoc.Save "C:\Send to Docmall\Upload\LCIF\" & KOID & "\batch.xml"
End Sub

Sub XMLBuilder_ALL_OnUnload

End Sub
  • Like 1
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Weekend PC Game Deals: Automation fests, Civilization for free, charity specials, and more by Pulasthi Ariyasinghe Weekend PC Game Deals is where the hottest gaming deals from all over the internet are gathered into one place every week for your consumption. So kick back, relax, and hold on to your wallets. The Epic Games Store unlocked a big strategy game giveaway earlier this week: Civilization VI: Platinum Edition. Coming in from Firaxis Games, the turn-based 4X experience has you starting world-conquering campaigns to explore, expand, exploit, and exterminate everything in your empire's reach. PvP and co-op multiplayer are also options if the various forms of AI prove to be too easy or even too troublesome. The Sid Meier’s Civilization VI: Platinum Edition giveaway is live until July 24, and it comes with two massive expansions as well as six DLC packs with extra scenarios, leaders, and more. Next week, tower defense title Legion TD 2 will become the latest freebie on the Epic Games Store. The Humble Store brought a new bundle for action game fans this weekend, and it's all about the Devil May Cry franchise. The Devil Trigger Collection begins with DmC: Devil May Cry and Devil May Cry HD Collection for $10. If you want to complete the bundle, it will set you back $20, which gets you Devil May Cry 4 Special Edition as well as the most recent entry, Devil May Cry 5, as well as its Vergil DLC. This bundle has two weeks left on its counter before it goes away. Big Deals Most publishers are returning to their usual weekend specials after the massive summer sales, so there are plenty of discounts to go around. There's even a special Make a Wish charity sale running on Steam with some discounted viral hits. With all those and more, here's our hand-picked big deals list for the weekend: Satisfactory – $27.99 on Steam Captain of Industry – $24.49 on Steam No Man's Sky – $23.99 on Steam Persona 5 Royal – $23.99 on Steam No More Room in Hell 2 – $22.49 on Steam FOUNDRY – $20.99 on Steam Banishers: Ghosts of New Eden – $19.99 on Steam SULFUR – $19.99 on Steam Assassin's Creed Mirage – $19.99 on Steam Alan Wake 2 – $19.99 on Epic Store Grand Theft Auto V Enhanced – $19.79 on Steam Norland – $19.49 on Steam Stray – $17.99 on Steam V Rising – $17.49 on Steam Dyson Sphere Program – $15.99 on Steam The Outlast Trials – $15.99 on Steam Warhammer 40,000: Darktide – $15.99 on Steam The Outlast Trials – $15.99 on Steam Red Dead Redemption 2 – $14.99 on Steam Turing Complete – $13.99 on Steam Eden Crafters – $13.99 on Steam Core Keeper – $13.99 on Steam Thank Goodness You're Here! – $12.99 on Steam Opus Magnum – $9.99 on Steam Autonauts – $9.99 on Steam EXAPUNKS – $9.99 on Steam DRAGON BALL XENOVERSE 2 – $9.99 on Steam Superliminal – $9.99 on Steam Heaven's Vault – $9.99 on Steam RAILGRADE – $9.89 on Steam Goat Simulator 3 – $9.89 on Steam Tchia – $9.89 on Steam ACE COMBAT 7: SKIES UNKNOWN – $9.59 on Steam PAYDAY 3 – $8.99 on Steam Assassin's Creed Origins – $8.99 on Steam Viewfinder – $8.74 on Steam Escape Academy – $7.99 on Steam Pit People – $7.99 on Steam Skull and Bones – $7.99 on Steam Immortals Fenyx Rising – $7.99 on Steam Imperator: Rome – $7.59 on Steam SHENZHEN I/O – $7.49 on Steam Tom Clancy’s The Division 2 – $7.49 on Steam Bassmaster Fishing – $7.49 on Steam Let's Build a Zoo – $6.99 on Steam The Forgotten City – $6.24 on Steam Control Ultimate Edition – $5.99 on Steam Bramble: The Mountain King – $5.99 on Steam Assassin’s Creed Rogue – $5.99 on Steam RoboCop: Rogue City – $4.99 on Steam Kingdom Two Crowns – $4.99 on Steam Scott Pilgrim vs. The World: The Game – $4.94 on Steam Castle Crashers – $4.49 on Steam BattleBlock Theater – $4.49 on Steam TOEM: A Photo Adventure – $3.99 on Steam Supraland – $3.99 on Steam Vampire Survivors – $3.99 on Steam Darkwood – $3.74 on Steam Valiant Hearts: The Great War – $3.74 on Steam TIS-100 – $3.49 on Steam PAYDAY 2 – $3.29 on Steam Cake Bash – $2.99 on Steam Ragnarock – $1.99 on Steam Alan Wake – $1.49 on Steam Civilization VI Platinum Edition – $0 on Epic Store DRM-free Specials Lastly, here are some highlights from the DRM-free discounts available on the GOG store this weekend: Age of Wonders 4 - $29.99 on GOG Pathfinder: Wrath of the Righteous - Game of the Year Edition - $19.99 on GOG Tomb Raider IV-VI Remastered - $19.49 on GOG The Thaumaturge - $19.24 on GOG Chained Echoes - $13.74 on GOG Tyranny - Gold Edition - $12.49 on GOG Tomb Raider I-III Remastered Starring Lara Croft - $11.99 on GOG Baldur's Gate: Enhanced Edition - $9.99 on GOG Baldur's Gate II: Enhanced Edition - $9.99 on GOG Neverwinter Nights: Enhanced Edition - $9.99 on GOG Old World - $9.99 on GOG Icewind Dale: Enhanced Edition - $9.99 on GOG Neverwinter Nights: Doom of Icewind Dale - $7.99 on GOG Kingdom Come: Deliverance - $5.99 on GOG Might and Magic 6-pack Limited Edition - $4.99 on GOG Heroes of Might and Magic 3: Complete - $4.99 on GOG Blood Omen: Legacy of Kain - $3.49 on GOG Might and Magic 8: Day of the Destroyer™ - $2.99 on GOG Worms Armageddon - $2.99 on GOG ATOM RPG: Post-apocalyptic indie game - $2.99 on GOG Keep in mind that availability and pricing for some deals could vary depending on the region. That's it for our pick of this weekend's PC game deals, and hopefully, some of you have enough self-restraint not to keep adding to your ever-growing backlogs. As always, there are an enormous number of other deals ready and waiting all over the interwebs, as well as on services you may already subscribe to if you comb through them, so keep your eyes open for those, and have a great weekend.
    • Wild that this was even allowed from the jump
    • Microsoft stops using China-based engineers to support US defense clients by Hamid Ganji Microsoft announced on Friday that its China-based engineers can no longer provide technical support to the US military and other defence clients using the company's cloud services. Frank Shaw, Microsoft's Chief Communications Officer, wrote on X, "In response to concerns raised earlier this week about US-supervised foreign engineers, Microsoft has made changes to our support for US Government customers to assure that no China-based engineering teams are providing technical assistance for DoD Government cloud and related services." The issue came into the spotlight after a report by ProPublica detailed how Microsoft's Azure engineers in China are providing technical support to the US defense clients. Microsoft had apparently told ProPublica that its engineers and contractors complied with US government laws. These China-based engineers are reportedly supervised through so-called "digital escorts" in the US, who are allegedly less technically qualified than the engineers and can not determine whether the Chinese engineers under their supervision pose a cyber threat to the United States. On Friday, Senator Tom Cotton sent a letter to Defense Secretary Pete Hegseth, demanding explanations about how these "digital escorts" are trained to detect threats, as well as the list of contractors that use Chinese personnel. "The US government recognizes that China's cyber capabilities pose one of the most aggressive and dangerous threats to the United States, as evidenced by infiltration of our critical infrastructure, telecommunications networks, and supply chains," Cotton wrote. In a video posted on X, Hegseth said this is "obviously unacceptable" and that he's issuing a two-week review of Pentagon cloud deals to ensure that "China will no longer have any involvement whatsoever in our cloud services, effective immediately." The US Defense Secretary also said the current controversy is due to "A legacy system created over a decade ago, during the Obama administration." Microsoft, Amazon, Google, and Oracle jointly received a $9 billion Department of Defense cloud services contract in 2022.
    • This morning down to 17% after 8 days.
    • Cutcon 4.0 by Razvan Serea Cutcon is a free, open-source desktop app for cutting, converting, and previewing video, audio, and image files. Built with Kotlin and powered by FFmpeg, it's fast, lightweight, and easy to use. Ideal for content creators, editors, and developers, Cutcon supports a wide range of media formats and offers a clean user interface. Originally forked from the Clipper project, it enhances performance and usability while remaining fully cross-platform. Whether trimming videos or converting audio formats, Cutcon streamlines your workflow without compromising quality. Perfect for those seeking a simple yet powerful media processing tool. Cutcon offers three core functions that make working with media files fast and simple: Cut – Remove unwanted sections from video, audio, or image files without re-encoding. Keep only what you need. Convert – Change files from one format to another using FFmpeg. Supports a wide range of formats for video, audio, and images. Preview – Play media directly inside the app before cutting or converting. Quickly verify content without opening another program. Cutcon 4 release notes: This release rebases Cutcon on Clipper v1.20.0 bringing support for Linux and macOS and updating the app branding. Also, there is now only one variant of the app with support for most common media types. New features Add support for Linux operating system (common distros) Add support for macOS operating system (experimental) Add support for playing FLAC audio format Add support for playing Opus audio format Improvements Update app brand (logo, colors) Improve media player to hugely boost its performance Use a fake file for the app initial input source Make theme colors change with animation Update the app error window layout Misc Change log file directory to user home Several improvements in app code Download: Cutcon 4.0 | 89.8 MB (Open Source) View: Cutcon Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Dedicated
      Homeless Vagrant earned a badge
      Dedicated
    • One Month Later
      Coolray5432 earned a badge
      One Month Later
    • Week One Done
      Coolray5432 earned a badge
      Week One Done
    • One Year In
      Jonabomuk earned a badge
      One Year In
    • One Month Later
      Jonabomuk earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      498
    2. 2
      ATLien_0
      223
    3. 3
      Michael Scrip
      196
    4. 4
      Xenon
      161
    5. 5
      +FloatingFatMan
      138
  • Tell a friend

    Love Neowin? Tell a friend!