473,396 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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

Nov 13 '05 #1
2 2133
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

Nov 13 '05 #2
Thanks, I'll give that a try..

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ari Royce Hidayat | last post by:
Dear ALL, Is there some one ever faces this problem? And fix it? The scenario is: There's an html page that hosts a .net object (using object tag), and this page opens the second html page...
5
by: Dani | last post by:
Hello everybody, I have some code that disables form elements on body load, but I notice when I hit the "back" button, I need to re-enable the form elements (that is done by clicking on a radial...
14
by: dale zhang | last post by:
Hi groups, Can anyone give me the equivalent C# sharp code for this VB.ET code, :: VB.NET :: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _ Handles...
0
by: phmyhn | last post by:
I have two web pages, one is viewlarger.aspx, another one is shoppingcart.aspx. On the viewlarger.aspx, when clicking "add to cart" image button, the sub appends the id (passed from another page...
1
by: Elliot M. Rodriguez | last post by:
..NET Framework 1.1 Has anyone reported or experienced NullReferenceException errors when accessing the HTTP_REFERER value on clients that are behind web blocking software? At least one of...
4
by: ibiza | last post by:
Hi all, I have a problem which I don't understand with the "~" mark in a NavigateUrl property of an asp:HyperLink. I have this in a master page, to build the standard menu (rMenuItems is a...
6
by: kelvlam | last post by:
Hello, I'm a new begininer with JavaScript. I'm trying to figure out which is the best approach, and to understand the differences between them. I have a <Aelement that's suppose to either...
1
by: spamguy | last post by:
I have a DataGrid and a column that changes into a DropDownList when edited: <columns> <asp:templatecolumn headertext="Role Type"> <itemtemplate> <asp:hyperlink id="hlinkRoleType"...
2
by: Peter Laman | last post by:
In my app I need to dynamically generate a series hyperlinks. Each hyperlink's action must be to focus a field in a <form>. I created the following function to create such a link (the argument is a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.