hyperlink using part of file name

G

gymphil

Can anyone assist?
I am using a hyperlink in vba to open an external pdf file. I want to be
able to have as part of the link, part of the file name
Application.FollowHyperlink "\\drawingofficeintranet\zz publication
order" & Me.Publication_Number & "*" & ".pdf".
I have tried using the wildcard as the pdf's that I am attempting to open
have large file names that include the 'publication_number' that is on the
form and in the database table.
Thank you
 
S

Software-Matters via AccessMonster.com

Hi,
You can not use * in a filename and that is what the conactenation is doing i.
e. if me.publication was 75 then this is what would be output - "\\
drawingofficeintranet\zz publication order75*.pdf" and this is not allowed.

The best way round it is to conactenate the rest of the path on to the end.
 
G

gymphil

Thank you for the quick response.

My trouble is that the remainder of the file name on the database does not
match the full pdf file name that I am trying to link to. The only thing that
is common is the first 6 characters.

Is there another way to achieve this without having ensure the two match
perfectly?
 
S

Software-Matters via AccessMonster.com

I don't think so, not from a hyperlink anyway. You might be able to do it
with a search function or something.
 

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