Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kiswar Malik   on Sep 10 In MS Office Category.

  
Question Answered By: Von Fischer   on Sep 10

Check your resulting Filename string  (kPath)
try:
debug.print kPath & oCell.Value & ".txt"

You'll see that your file  names are:
C:\users\adrian\documents\notesABC.txt
not:
C:\users\adrian\documents\notes\ABC.txt

You'll also find your missing files in:
C:\users\adrian\documents
called notesABC.txt, notesXYZ.txt, etc.

In other words, you need to add a "\" to the end of:
"C:\users\adrian\documents\notes\"

If I were you, I'd build the filename string as:

FName = kPath & ocell.value & ".txt"
you can the do things like fileexists(fname) and such
to handle overwriting existing files, etc.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Need help with a script Or get search suggestion and latest updates.


Tagged: