relative adressing for hyperlink

P

pblidefalk

I am making a VBA macro, which I would like to move to an CD later.
Therfore I would like my hyperlinks relative.

Do anyone know how to adress a file in another folder? Gving the
absolute path and filename works, see below:

ActiveDocument.Hyperlinks.Add Anchor:=Selection.Range, Address:= _
"C:\Project\PDF\" & PN & ".pdf", SubAddress:= _
"", ScreenTip:="", TextToDisplay:=PN

What I would like to do is an Adress like "file:..\PDF\" & PN & ".pdf"
however this does not work

Is there any method for defining the adress to step up 1 folder-level?
For me neither "..\" nor "../" works. What is wrong? I have been
searching the documentation i VBA but didn't found anything.

Many thanks from Putte
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top