View Full Version : Export data to file

01-15-2007, 08:49 PM
I have several slides with check boxes and text boxes. Through VBA, I can create one or more text strings and print them to the debugger. However, I would like to save the string to a file. Before a user begins making choices, I use an inputbox to get his/her initials. I should be able to use these initials plus the date to generate the file name.

Is there a quick and dirty way of creating and closing the file? :banghead:

John Wilson
02-25-2007, 01:01 AM
There are examples on pptfaq.com in the programming > exporting section

02-25-2007, 10:01 AM
Never knew that site existed. Do now and have it bookmarked. Looks like a good site for some misc information. Thank you. I found what I needed and will put it to work later.

02-25-2007, 10:45 AM
Hi Kicker
Will you post your solution when you have it for the benefit of others.

John Wilson
02-25-2007, 11:24 AM
This is the code I use to output text . Obviously other users would need to change the path. The text can be a variable or text as here.Sub TextOut()
FileNum = FreeFile
Open "C:/Documents and Settings/John/My Documents/" & "NotesText2.TXT" For Output As FileNum
Print #FileNum, "This is the text to save"
Close FileNum
End Sub