dbTalk Databases Forums  

Using "Hyperlink" OR "OLE Object" Datatypes in VB/VBA

comp.databases.ms-access comp.databases.ms-access


Discuss Using "Hyperlink" OR "OLE Object" Datatypes in VB/VBA in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ajames54@hotmail.com
 
Posts: n/a

Default Using "Hyperlink" OR "OLE Object" Datatypes in VB/VBA - 12-01-2004 , 10:36 AM






I have hundreds if not thousands of documents in various formats that I
have been asked to organize in such a way as to make it easy for the
people around here to search for them and to group them based on their
own criteria.. it seems like a pretty straightforward project.

I would like to embed links to the various objects in the database
manually I can do it with either OLE or Hyperlinks but there are too
many to do this manually, and I don't want to have to manually edit the
database every time an update is needed.

I can't find any reference to code that I can use to add or edit either
of these datatypes through vb/vba, can someone please point me in the
right direction?

Thanks


Reply With Quote
  #2  
Old   
Billie Kennedy Jr
 
Posts: n/a

Default Re: Using "Hyperlink" OR "OLE Object" Datatypes in VB/VBA - 12-01-2004 , 01:07 PM






if you have some common naming protocol for your documents you can use
something similar to this.

If Me.Docname <> "" Then
stGMR = Me.Docname



Set fs = Application.FileSearch
With fs
..LookIn = "\\Pathtodocuments\"
..FileName = stGMR + ".doc"
If .Execute > 0 Then
Me!DocLnk.Visible = True
Me.LabelDocLnk.HyperlinkAddress = "\\Pathtodocuments\" + stGMR +
".doc"

End If

End With
fs = Null


Set fs = Application.FileSearch
With fs
..LookIn = "\\Pathtodocuments"
..FileName = stGMR + ".pdf"
If .Execute > 0 Then
Me!LabelDocLnk.Visible = True
Me.LabelDocLnk.HyperlinkAddress = "\\Pathtodocuments" + stGMR +
".pdf"

End If

End With


End If


Reply With Quote
  #3  
Old   
ajames54@hotmail.com
 
Posts: n/a

Default Re: Using "Hyperlink" OR "OLE Object" Datatypes in VB/VBA - 12-01-2004 , 02:05 PM



Thanks, I'll give that a try..


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.