Results 1 to 15 of 15
  1. #1
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlink Word to Access (Access 97/Word97 latest SP)

    I apologize in advance for my inability to figure this out. <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    I have a flat-file legal research DB in Access 97, containing about 1800 records. I use it in 3x5 card fashion to keep track of various items by key word and other criteria. I enter data into the DB via Form View, into a form I've cleverly <img src=/S/bow.gif border=0 alt=bow width=15 height=15> laid out for that purpose.

    Several fields in each record are text fields. While in Form View, as I make my text entries, I would like to be able to insert in a particular record a simple hyperlink to one or more existing Word 97 documents.

    Can I do this within an Access text field while in Form View, e.g., by typing in the path to the document and then doing something magic, or must do it some other way, e.g., adding a to the DB design new field reserved for hyperlinking? In either case, what do I do, step-by-step, to accomplish this?

    Thanks,

    Herb Silverberg <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    I don't have a whole solution for you, but maybe some ideas? You could enter the path to the document in the field, and then have the form recognize when the path is in the field, have code that opens the document?

    Something like
    Private Sub MyFieldName_DblClick(Cancel As Integer)
    Dim strFieldContents as string
    strFieldContents=MyFieldName
    If instr(strFieldContents,".doc")>0 Then
    Shell "winword.exe " & strFieldContents, vbMaximizedFocus
    End If

    End Sub
    I didn't test this, but this should get you on the track to what you're looking for.

  3. #3
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    Thanks, Cecilia --

    I'm glad to know that at least one other person out there doesn't think that this capability already exists in some ready way! But it should, shouldn't it???

    I'll take a crack at your script when I'm not already feeling particularly suicidal.

    Herb

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    San Francisco, California, USA
    Posts
    358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    There other ways to do it. IMHO, in Access 97, this is the easiest.

    Good luck.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    <hr>But it should, shouldn't it???<hr>
    Why should it? Access is a database, not a document management system or a web browser. It works nicely as a database, but when you try to make it masquerade as something else, you run into problems. You can do those things, but there's no reason to expect them to be easy or built in.
    Charlotte

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    You can add a hyperlink field to your table:
    <UL><LI>Open the table in design view.
    <LI>Type the field name in the first column of the first empty row.
    <LI>Select Hyperlink from the dropdown list in the second column.
    <LI>Save the design.
    <LI>Open your form in design view.
    <LI>Drag the hyperlink field from the Fields window to the detail section.
    <LI>Save the design and switch to form view.
    <LI>You can enter and edit the hyperlink text box by typing the path and file name of a Word document, or by right-clicking the text box and selecting Edit Hyperlink...[/list]You can enter only one hyperlink into the text box. If you need links to several documents in one record, you need to create as many hyperlink fields as the maximum number of documents linked to one record.

  7. #7
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    "Hush, Hush, Sweet Charlotte"

    (Somebody actually wrote that long before I did.)

    Methinks thee suffereth from tunnel vision. Access is but one component of what is claimed to be a SUITE of integrated products known as Microsoft Office. MSWord is another component. I can readily insert all sorts of links to all sorts of external files and features in Word97 (something called OLE???) -- why shouldn't I be able to get one component of the suite to link up simply and readily to a file created by another??? (In other words, If I can pop a piece of an Excel spreadsheet into a word document via a link,why not link to a Word document from within Access???)

    I know what frosted your gizzard: I said "flat-file" and "3x5", not "hyper-relational multi-combinatorial mega-masked fractally-filtered 200,000-record SQL-capable data array." Sorry 'bout that -- I guess I've proved I'm a simpleton by simply wanting to do a simple thing with a simple thing, simply. (BTW, I wouldn't have this problem if Access allowed me to create a text field of any size. My large-scale text info is, after all, "data" that needs a base.)

    I submit to the judgment of the universe (or at least the loungers): if this suite were truly integrated, shouldn't I be able to hyperlink across component applications by typing a path name, highlighting it, and clicking on a button in a toolbar to turn it into a hyperlink? Does Outlook Express violate a universal moral principle by allowing me to -- God forbid -- attach a Word Document to an E-MAIL? What is Outlook Express, an e-mail program or a document transfer utility?

    Or should I just be ashamed of myself for daring to dream?

    Shame on you, Charlotte, for being so proprietary about Access that you would castigate someone honestly seeking improved functionality and productivity. And don't EVER let me catch you linking to a piece of clip-art or Excel inside a Word document. It's a WORD PROCESSOR, dammit, not a desktop publishing program!!!

    Herb

  8. #8
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    Thanks so much, Hans -- I'd much rather live in your neighborhood than Charlotte's!

    Herb

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    But for sure California is much nicer than Holland - if only for the climate!

  10. #10
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    <hr>BTW, I wouldn't have this problem if Access allowed me to create a text field of any size.<hr>
    Note that if you want to store text that exceeds the 255 character limit specified for Text fields in Access you can use a Memo field. A memo field can store appx 64,000 characters. Memo fields won't be as efficient as text fields, and are reportedly prone to corruption in a multi-user environment, but can be useful when working with large blocks of "verbiage" (if you work in the legal field I assume you have a lot of "verbiage" to deal with). If you are only one using the database you are unlikely to encounter the "corruption" issue. For example, you can save a lengthy Word doc as plain text file, select entire document, and paste into an Access memo field (assuming it's less than 64,000 character limit), then use a suitably sized text box on a form to display memo field in legible fashion.

    As recommended you can use a Hyperlink field to store hyperlinks to Word or other documents. In some of our programs there is a "case file" of sorts (typically a .PDF document) related to each record in database. I simply store a link to the .PDF doc (which resides on server), the user clicks the link & the file opens. This is simplest approach, especially if you are averse to using VBA code or "scripts".

    HTH

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    <hr> It's a WORD PROCESSOR, dammit, not a desktop publishing program!!!<hr>
    You see, you do know the difference, you just don't want to live with it. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Charlotte

  12. #12
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    <<if this suite were truly integrated, shouldn't I be able to . . . .>>

    Therein lies the problem. In many respects, the Office Suite is reasonably well integrated, but the devil is in the details. Several techniques are available to do what you propose, but each of them have certain advantages and disadvantages. The novice database user may never bump into them, but those of us who do this for a living have all had horror story experiences. For example, one way to do what you propose is to actually embed the Word document as an OLE object in the "flat table" you have. Only problem is, you will in all likelihood exceed the maximum size for an Access .mdb database - if you don't run out of hard drive space first. It wouldn't be a problem if you only had 50 documents to track, but with 1000 or more it's different situation. Charlotte's response was simply pointing out the pitfalls - it isn't a simple task.

    BTW, methinks your prose is substantially overwrought <img src=/S/exclamation.gif border=0 alt=exclamation width=15 height=15>
    Wendell

  13. #13
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    MarkD:

    Thanks for reminding me of this. Actually, I do have a memo field, and I do use it frequently for documents that are a page or two long. The problem, as you've correctly noted, is that it's limited to plaint text. Once you lose the graphic and organizational elements (fonts, section titling, footnoting, bolding, italics, etc.) that we use to help ourselves navigate through longer documents, it becomes hard to cope with a document by scrolling through a huge field that can be presented as only a small window in a form with a number of other elements.

    Come to think of it, the fact that these are pure text fields is why I can't have my wish about clicking a toolbar button and turning a typed path designation into a hyperlink -- a hyperlink by definition is not pure text! So I guess that my dream Access would see the path, recognize it for what it is (just as Word recognizes an e-mail address and automatically turns it into a hyperlink) and automatically create a hyperlink field for it, or at least automatically plug it into a hyperlink field that I've already created per Hans' recipe.

    Even I know that's too much to ask!

    Thanks to all thread participants!

    Herb

  14. #14
    Lounger
    Join Date
    Jun 2002
    Location
    New Mexico
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    Hello, Wendell . . .

    Re the prose --- it was after midnight, y'know. At the witching hour my dark side emerges and I uncontrollably start saying what I really think.

    Even the most ignorant lounger shouldn't be castigated for asking an honest question -- especially one that's preceded by a decent effort to solve the problem on one's own, and then by an apology.

    If those of you who do this for a living are going to take umbrage at questions from those of us who don't, why should either of us lounge here? Experts who want to deal only with other experts should just lurk when we tadpoles paddle by. IMHO ("H" for "Hubristic"), Charlotte should not have chided me for trying to stretch her pet program out of shape; if she didn't care to spend the time pointing me toward a solution, as others did, she should just have gone on to the next post. If she alone had responded, I'd still have no solution. If she had refrained from entering the lists (in the medieval sense, of course), I wouldn't have felt the need to resort to overwrought [iron] armor.

    I hereby retire from this list (the jousting kind, not the listserv kind).

    Herb

  15. #15
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Hyperlink Word to Access (Access 97/Word97 latest SP)

    IMHO, Charlotte neither castigated, took umbrage, chided or anything that should have raised your hackles. She simply stated the facts, and beyond that, she answers literally hundreds of questions daily - of necessity her responses are often brief and to the point. In the Lounge environment, we all have to keep our sensitivities turned down a bit. In any event you have several different ways to approach your problem, and a few cautionary notes, so the Lounge has served it's purpose once more.
    Wendell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •