-
[RESOLVED] get path
Hello people,
I wrote this code to pick the absolute path
PHP Code:
StrOldPath = ActiveDocument.Path
StrNewPath = Left(StrOldPath, InStrRev(StrOldPath, "\"))
StrOldPath = StrOldPath & "\"
StrNewPath = StrNewPath
here is the result I recieve from the msgbox
C:\Users\xxxx\Desktop\tester\423434\
I need to make a variable of the number 423434
I need to make the number in the path to a variable could somone help me out?
Thank you in advance
-
Re: get path
I don't understand. Where is the "7411211?"
-
Re: get path
I meant of course 423434 changed in the thread too :)
-
Re: get path
you could split the path, then grab the last element of the resulting array, like:
Code:
dim splits() as string 'or is it "as new string" ?
dim lastElement as string
splits=split(activedocument.path,"/")
lastElement=splits(ubound(splits))