Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Saving to Intranet Site

Hi,

I have automated the saving of an excel workbook to an intranet site, with
the current days date as part of the file name so that the file name looks
some like:
filename yymmdd.
However I would like to automate the creation of new folder names, so that
if there isn't a folder for either the current year, or the current month, or
both, the macro will create them.

I was given the following, but this doesn't appear to work when the folder
address starts with http:

Sub TestDir()

If Dir("C:\Windhoos", vbDirectory) = "" Then
MkDir ("C:\Windhoos")
End If

End Sub


Please advise.

Many Thanks
Richard



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Saving to Intranet Site

Excel can't write to network drives which usally start with \\. these drives
need to be mapped to a drive letter. Look at your windows explorer (not
internet explorer) under tools - Map Network drives. You can map a new drive
and then save the file to the drive letter assigned.

"Richard" wrote:

Hi,

I have automated the saving of an excel workbook to an intranet site, with
the current days date as part of the file name so that the file name looks
some like:
filename yymmdd.
However I would like to automate the creation of new folder names, so that
if there isn't a folder for either the current year, or the current month, or
both, the macro will create them.

I was given the following, but this doesn't appear to work when the folder
address starts with http:

Sub TestDir()

If Dir("C:\Windhoos", vbDirectory) = "" Then
MkDir ("C:\Windhoos")
End If

End Sub


Please advise.

Many Thanks
Richard



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default Saving to Intranet Site

I am currently writing to this drive which starts http:// The save is
automated as part of a macro, I only want to make this dynamic so that new
folders do not have to be created manually.

"Joel" wrote:

Excel can't write to network drives which usally start with \\. these drives
need to be mapped to a drive letter. Look at your windows explorer (not
internet explorer) under tools - Map Network drives. You can map a new drive
and then save the file to the drive letter assigned.

"Richard" wrote:

Hi,

I have automated the saving of an excel workbook to an intranet site, with
the current days date as part of the file name so that the file name looks
some like:
filename yymmdd.
However I would like to automate the creation of new folder names, so that
if there isn't a folder for either the current year, or the current month, or
both, the macro will create them.

I was given the following, but this doesn't appear to work when the folder
address starts with http:

Sub TestDir()

If Dir("C:\Windhoos", vbDirectory) = "" Then
MkDir ("C:\Windhoos")
End If

End Sub


Please advise.

Many Thanks
Richard



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Saving to Intranet Site

Check what string the "Save Is" is using to save the file. What ever works
for the save as I would think also should work for the dir. to make your code
dynamic set a variable

myfile = C:\Windhoos",
If Dir(myfile, vbDirectory) = "" Then
MkDir (myfile)
End If

"Richard" wrote:

I am currently writing to this drive which starts http:// The save is
automated as part of a macro, I only want to make this dynamic so that new
folders do not have to be created manually.

"Joel" wrote:

Excel can't write to network drives which usally start with \\. these drives
need to be mapped to a drive letter. Look at your windows explorer (not
internet explorer) under tools - Map Network drives. You can map a new drive
and then save the file to the drive letter assigned.

"Richard" wrote:

Hi,

I have automated the saving of an excel workbook to an intranet site, with
the current days date as part of the file name so that the file name looks
some like:
filename yymmdd.
However I would like to automate the creation of new folder names, so that
if there isn't a folder for either the current year, or the current month, or
both, the macro will create them.

I was given the following, but this doesn't appear to work when the folder
address starts with http:

Sub TestDir()

If Dir("C:\Windhoos", vbDirectory) = "" Then
MkDir ("C:\Windhoos")
End If

End Sub


Please advise.

Many Thanks
Richard



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Saving to Intranet Site

Not at work right now, but I'm pretty writing directly to a UNC path is
possible.
No need to map a drive just for that.

If the OP is updating an intranet site then they should get access to the
filesystem and not use http for creating files.

Tim

"Joel" wrote in message
...
Excel can't write to network drives which usally start with \\. these
drives
need to be mapped to a drive letter. Look at your windows explorer (not
internet explorer) under tools - Map Network drives. You can map a new
drive
and then save the file to the drive letter assigned.

"Richard" wrote:

Hi,

I have automated the saving of an excel workbook to an intranet site,
with
the current days date as part of the file name so that the file name
looks
some like:
filename yymmdd.
However I would like to automate the creation of new folder names, so
that
if there isn't a folder for either the current year, or the current
month, or
both, the macro will create them.

I was given the following, but this doesn't appear to work when the
folder
address starts with http:

Sub TestDir()

If Dir("C:\Windhoos", vbDirectory) = "" Then
MkDir ("C:\Windhoos")
End If

End Sub


Please advise.

Many Thanks
Richard





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Publishing to intranet site SGT Buckeye Excel Discussion (Misc queries) 1 January 5th 07 06:39 PM
Downloading files from an Intranet site to Excel Droidy Excel Discussion (Misc queries) 2 October 9th 06 02:39 AM
Open excel file from password protected Intranet site(IE) Dan McCollick Excel Programming 4 May 17th 06 07:37 PM
can navigate through intranet site with Web Query (VB code?)? GEORGIA Excel Programming 0 July 26th 05 06:59 PM
Program won't run when uploaded to intranet site. mickiedevries[_8_] Excel Programming 1 June 30th 04 07:43 AM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"