Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Script to change outlook pst locations

Avatar of tlman12
tlman12 asked on
ProgrammingOutlookVB Script
2 Comments1 Solution1146 ViewsLast Modified:
I'm trying to create a vbscript or autoit script that will
a. Retrive an users PST location (i have a simple one that does this)
b. move the pst file from old location to a different location
c. repoint oulook to look for the pst file in the new location.

so far i've only been able to do a. suffesfully all the time, b. successfull part of the time and i haven't figured out c. at all

one of the problems is that this script will have to work with oulook 2002 to outlook 2007 possibly 2010 also windows xp and windows 7

is there a script out there that can do this? or can anyone help me out with it?

heres the code to get the pst files:
#Include <String.au3>
Func GetPathFromStoreID($strStoreID)
	Local $lngLen = "", $str = "", $lngColonPos = "", $final = ""
    For $lngLen = 1 To StringLen($strStoreID) Step 2
        $str = $str & _HexToString(StringMid($strStoreID, $lngLen, 2))
    $str = StringReplace($str, Chr(0), "")
    $lngColonPos = StringInStr($str, ":\")
    If $lngColonPos > 0 Then
		$final = StringRight($str, StringLen($str) - $lngColonPos + 2)
		Return $final

for vbScript
Function GetPathFromStoreID(strStoreID)  
	On Error Resume Next 
	For lngLen = 1 To Len(strStoreID) Step 2 
		str = str & Chr("&h" & Mid(strStoreID, lngLen, 2)) 
	str = Replace(str, Chr(0), vbNullString) 
	lngColonPos = InStr(str, ":\") 
	If lngColonPos > 0 Then 
		GetPathFromStoreID = Right(str, Len(str) - lngColonPos + 2) 
	End If      
End Function

Avatar of matrixnz

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers