OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

example : how to extract the file name of a document

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  

Did you find this example usefull ?
yes
100%
 100%  [ 3 ]
no
0%
 0%  [ 0 ]
Total Votes : 3

Author Message
elehenaff
Power User
Power User


Joined: 16 Apr 2004
Posts: 76
Location: paris - france

PostPosted: Wed May 19, 2004 9:09 am    Post subject: example : how to extract the file name of a document Reply with quote

example : how to extract the file name of a document
Code:

sub DocumentName
Dim Doc As Object
dim nom

Doc = Thiscomponent
nom= left(Doc.URL,len(Doc.URL)-4)

position=inStr(name,"/")
while (position<>0)
   nom = right(name,len(nom)-position)
   position=inStr(nom,"/")
wend
MsgBox(nom)

end sub


Last edited by elehenaff on Fri May 21, 2004 1:51 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
avantman42
Super User
Super User


Joined: 28 Jul 2003
Posts: 751
Location: Staffordshire, UK

PostPosted: Thu May 20, 2004 3:27 am    Post subject: Reply with quote

I've moved this thread to the Code Snippets forum, which is intended for little snippets of working code like this.

Russ
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group