PC Review


Reply
Thread Tools Rate Thread

date format outlook vba

 
 
New Member
Join Date: May 2010
Posts: 1
 
      3rd May 2010
I am trying to create a pst file on the C:\root directory named as the current date though using the code;

Sub CreatePST()
Dim myOlApp As New Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Set myNameSpace = myOlApp.GetNamespace("MAPI")
myNameSpace.AddStore "c:\" & Date & ".pst"
End Sub

Outlook creates the pst in a subfolder of day of the month as the year instead of on the root drive. Does anyone know how to format the date so that the file is saved on the root directory ie. to save as dd-mm-yy etc instead of dd/mm/yy. (eg, instead of using /)?

Any help greatly appreciated.

thanks

James
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting complex date format to normal date format in Excel BlackNarcissus Microsoft Excel Misc 0 28th Jul 2011 04:28 PM
permanent conversion of 1904 date format to 1900 date format Jos Microsoft Excel Worksheet Functions 3 21st Jul 2009 06:32 PM
converting general date format data into short date format savigliano Microsoft Access Form Coding 3 27th Nov 2006 04:37 AM
Export Outlook date field as date/time format to Access database =?Utf-8?B?QmVja3k=?= Microsoft Outlook Discussion 0 2nd Dec 2004 02:49 PM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier Microsoft Excel Programming 0 22nd Sep 2004 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:16 PM.