Results 1 to 10 of 10
  1. #1
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Create Hyperlink that prompts to SAVE (2000 SR-1)

    A co-worker wants to insert a Hyperlink to another file that is not a word processing document. When the user clicks the link he wants them to be able to SAVE the file, not open it in Word because it is not a w.p. file. This should work the way it does when getting a file from the internet; you are asked to either open or save the file. Is this possible in Word, and if so, how?

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    I'm a little over my head and no time to try this out, but...

    Instead of using hyperlinks, use a MACROBUTTON field and do whatever you want in a macro. This field normally requires a double-click, but you can change that to a single click by placing "Options.ButtonFieldClicks = 1" in the document open event. If this doesn't work, post back and someone smarter than me will fix it! HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    Checked it out and it works OK, except that the cursor doesn't turn into a finger. You will want to underline the text and make the font blue so it looks like a hyperlink, plus add this line of code at the start of the macro<pre> Selection.MoveRight unit:=wdCharacter, Count:=1, Extend:=wdMove</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  4. #4
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    Thanks for the suggestion. I'm pressed for time right now but will try it out in the morning.

  5. #5
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    Please explain to me the "document open event".

  6. #6
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    > document open event
    1) Open your Word document and press <Alt><F11> to open the VBE.
    2) In the Project Explorer window (upper left), double-click on the ThisDocument module for your document.
    3) In the code window (upper-right), paste the following code:<pre>Private Sub Document_Open()
    Options.ButtonFieldClicks = 1
    End Sub</pre>

    4) Press <Alt><F11> again to return to Word and close your document, saving the changes.

    Now, when you open this document, you'll only need one click for the GOTOBUTTON or MACROBUTTON field.

    I've attached my test document in case you have problems. HTH --Sam
    Attached Files Attached Files
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  7. #7
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    I follow you on creating the "document open event." However, I don't know how to get the macro to do what I want. I start the macro, navigate to the document (remember, it is NOT a word processing document and I don't want it to attempt to open), but I have no idea what to do to get it to save the file from the network to the local drive. When I right-click there are only OPEN options, no SAVE options, which is what I want to have happen. Since I cannot program the macro, the hyperlink is a moot point Help!

  8. #8
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    The user found a different workaround. He inserted a hyperlink pointing to the specified file, then he changed it to ftp://path/filename and changed all the backslashes to front flashes. It worked fine for his *.pqi file. However, this seems to be document sensitive. We could not get it to work on either a Word file, an Excel file, or even a WordPerfect file. I also could not get it to work on a *.dll, a *.com or a *.exe file. So far we have no clue why, and I would *really* like to know. We've tested this on both Windows 2000 boxes and Windows 95 boxes and duplicated the behavior.

  9. #9
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    Brenda, I was really hopeing that you would write the macro! <img src=/S/wink.gif border=0 alt=wink width=15 height=15> I out of my area of expertise with IE, but here goes:
    1) Use the Tools | Macros | Record New Macro to display Record Macro dialog box.
    2) Change the macro name to Test and store-macro-in to your document. Press OK.
    3) Press the stop recording button.
    4) Use the Tools | Macro | Macros menu to edit the Test macro.
    5) Replace the Test macro code with<pre>Option Explicit

    Sub Test()
    Dim ieApp As New InternetExplorer
    Selection.MoveRight unit:=wdCharacter, Count:=1, Extend:=wdMove
    ieApp.Visible = True
    ieApp.Navigate "C:Autoexec.bat"
    End Sub</pre>

    6) Change Autoexec.bat to the file that you want
    7) While in the VBE, use the Tools | References to add a reference to Microsoft Internet Controls (just click the checkbox)

    Again, I'm attaching my test document. Have fun, Sam
    Attached Files Attached Files
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  10. #10
    Lounger
    Join Date
    Nov 2001
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Create Hyperlink that prompts to SAVE (2000 SR-1)

    I got it to work, sort of. If the document I insert in place of "c:autoexec.bat" is a Word document, it opens anyway. When I used a *.exe file, it did give me the prompt to save it. So on a limited basis, it did work! Thank you. Now I'll have to go over this and try to understand the "why's" so I can do it on my own the next time.

Posting Permissions

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