|
-
Aug 12th, 2014, 08:46 AM
#1
Thread Starter
Lively Member
[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
Last edited by elmnas; Aug 13th, 2014 at 02:06 AM.
-
Aug 12th, 2014, 08:49 AM
#2
Re: get path
I don't understand. Where is the "7411211?"
-
Aug 13th, 2014, 02:07 AM
#3
Thread Starter
Lively Member
Re: get path
I meant of course 423434 changed in the thread too
-
Aug 13th, 2014, 06:09 AM
#4
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))
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|