2989 Posted August 31, 2005 Share Posted August 31, 2005 I need to update the stationary in Outlook for various users in my organisation and wish to do a simple copy of the outlook stationary file i have created to each users profile, which is located in C:\Documents and Settings\user profile\Application Data\Microsoft\Stationery How do identify the path to the current user profile ?thanks Link to comment Share on other sites More sharing options...
MHz Posted August 31, 2005 Share Posted August 31, 2005 (edited) Replace C:\Documents and Settings\user profile\Application Data with @AppDataDir OR Replace C:\Documents and Settings\user profile with @UserProfileDir Examples: @AppDataDir & '\Microsoft\Stationery' @UserProfileDir & '\Application Data\Microsoft\Stationery' Edited August 31, 2005 by MHz Link to comment Share on other sites More sharing options...
2989 Posted August 31, 2005 Author Share Posted August 31, 2005 Thanks worked great. ; ----------------------------------------------------------------------------; <START:>; ----------------------------------------------------------------------------; -----Copy Data.-----filecopy('c:\temp\forksales.htm', @AppDataDir & '\Microsoft\Stationery',"1")filecopy('c:\temp\email_logo.gif', @AppDataDir & '\Microsoft\Stationery',"1");; -----Cleanup: Delete C:\temp and all subdirs and files.-----DirRemove("C:\temp", 1);; -----Open outlook and set default Stationary Template.-----Run("c:\progra~1\microsoft Office\office11\outlook.exe", "",@SW_HIDE)Winwaitactive("outlook" ,"",2)send("!t")send("o")send("^{TAB 2}")send("!t")WinWaitactive("" ,"",2)send("f")send("{ENTER}")send("!a")send("{ENTER}")send("!f")send("x")exit; ----------------------------------------------------------------------------; <END:>; ---------------------------------------------------------------------------- Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now