Run-Time error 5824 - insufficient memory or disk space.

Discussion in 'Word VBA' started by DaveW, Dec 20, 2007.

  1. DaveW

    DaveW Guest

    I have a VB macro which converts text with a document extension to hyperlinks.
    I keep getting the above run-Time error when I pass the text variable
    through as a parameter. I have checked the parameter variable is being passed
    through correctly. Can anybody give me clue to why this has started to
    happen in Office2007?
    a snippet from the code below the second Selection.Hyper...statemement
    works the first causes the error:-

    If LinkType = "H" Then
    Selection.Hyperlinks.Add Anchor:=Selection.Range,
    Address:=FileString, TextToDisplay:=FileString
    Selection.Hyperlinks.Add Anchor:=Selection.Range,
    Address:="c:\thisworks.txt", TextToDisplay:="thisworks"
    DaveW, Dec 20, 2007
    1. Advertisements

  2. DaveW

    Nimrod Guest

    You need to write it like this:

    Selection.Hyperlinks.Add Anchor:=Selection.Range, Address:="" & FileString
    & "", TextToDisplay:="" & FileString & ""
    Nimrod, Jan 1, 2008
    1. Advertisements

  3. DaveW


    Sep 25, 2013
    Likes Received:
    This is very useful for me. Thanks a lot.

    glakshman, Sep 25, 2013
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.