+ Reply to Thread
Results 1 to 3 of 3

Filepath with spaces recognized in code of template file but not in documents it creates

  1. #1
    Registered User
    Join Date
    02-24-2016
    Location
    Utrecht
    MS-Off Ver
    10
    Posts
    3

    Filepath with spaces recognized in code of template file but not in documents it creates

    Hi guys,

    Could you help me with a little issue? I have the following code which saves my file to a specified location with the date and a comment in the filename:

    Please Login or Register  to view this content.
    The problem lies in this line:
    Please Login or Register  to view this content.
    The files are somehow saved to srv-data1\home$\b.wolf\ so it seems like \1. PhD project files\ isn't recognized, I guess because of the spaces? The weird thing is that it does actually work when I use this button in the template file itself, but when I use the template to make a new document it doesn't work in this new document.

    Does anyone know a fix for this? I tried the following:
    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Registered User
    Join Date
    02-24-2016
    Location
    Utrecht
    MS-Off Ver
    10
    Posts
    3

    Re: Filepath with spaces recognized in code of template file but not in documents it creat

    Hmm I just realized that even if I change the name of the folder so that it doesn't contain any spaces (or numbers) it still doesn't work. Also, once when I used the button in the template file itself it saved the file not to the specified location, but to the same location as the template file (which is on the same network drive as the sepecified location). Maybe that helps figuring out what is wrong?

  3. #3
    Registered User
    Join Date
    02-24-2016
    Location
    Utrecht
    MS-Off Ver
    10
    Posts
    3

    Re: Filepath with spaces recognized in code of template file but not in documents it creat

    I think I found the problem: I had to add a closing "\" to the file path

    Also, I used a different path to the same location (H:\1. PhD project files\Analyses\) but I'm not sure if this made any difference

    Thanks anyhow

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Why is my VBA code creating a file in the Documents folder?
    By hadamhiram in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2015, 06:57 PM
  2. Trying to create a macro that creates and evenly spaces a number of identical images
    By hrstar24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2014, 07:05 PM
  3. [SOLVED] Trying to get the filepath on "Open", but get filepath of a temporary file instead
    By ianpwilliams in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-22-2013, 12:27 AM
  4. Error with VBA code Copying cells to a closed workbook, template sheet, documents and
    By Libster78 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-30-2010, 12:31 PM
  5. spaces not recognized as spaces
    By windsurferLA in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-27-2006, 06:49 AM
  6. spaces not recognized as spaces
    By windsurferLA in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-26-2006, 03:05 PM
  7. [SOLVED] spaces not recognized as spaces
    By windsurferLA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-26-2006, 12:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1