+ Reply to Thread
Results 1 to 9 of 9

Help with hyperlink

  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Help with hyperlink

    Guys,

    I have a MS 2013 Word document that a person would fill out and then click on the hyperlink to open in a email. Is it possible that when that person clickes on the hyperlink to email that document that it would automaticly attach the document to the email?

    Thanks for your help,

    MG3

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Help with hyperlink

    Not unless:
    a) the document has been saved; and
    b) the user allows Word to run a macro in the document, because what you want would require a macro.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with hyperlink

    OK thanks. What would be the VBA needed for this?

    MG
    Attached Files Attached Files
    Last edited by MG3; 12-14-2015 at 11:56 AM.

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Help with hyperlink

    A macro to do this might be written as:
    Please Login or Register  to view this content.
    Notes:
    1. The host system must have Microsoft Outlook installed, even if not in use;
    2. A reference to the Microsoft Outlook Object Library is required when you do the setup, using the oldest version of MS Office you plan to support;
    3. The document must be saved in the the docm format or the doc format, not the docx format;
    4. Within the 'With OutlkMlItm' ... 'End With' block there is provision for you to add an email title, body and, of course, the destination address; and
    5. None of this will work if the user doesn't allow Word to run macros - and there's nothing you can do to force them to.
    Last edited by macropod; 12-15-2015 at 04:03 AM.

  5. #5
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with hyperlink

    where do I put the file name of the document?

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Help with hyperlink

    You don't. Since the macro has to be in the document you're processing and you don't know what path & name the user has saved it under, it gets that via ThisDocument.FullName.

  7. #7
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with hyperlink

    Everything is working great, but I don't need to save it everytime I email it. can we eliminate the save it before sending it out via email?

    Thank you for your help on this matter.

    MG

  8. #8
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Help with hyperlink

    Quote Originally Posted by MG3 View Post
    I don't need to save it everytime I email it. can we eliminate the save it before sending it out via email?
    You can't attach something that hasn't been saved.

  9. #9
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with hyperlink

    ok thanks!

    MG

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel 2010 Create a macro to check if cell contains hyperlink then apply hyperlink style
    By chasidar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2013, 04:48 AM
  2. Using Vlookup to pull hyperlink from Master Hyperlink file list.
    By theflyingnimbus in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2013, 01:42 PM
  3. Replies: 1
    Last Post: 02-23-2013, 05:18 AM
  4. Replies: 20
    Last Post: 03-19-2011, 09:13 AM
  5. Replies: 5
    Last Post: 06-22-2006, 07:10 AM
  6. Replies: 0
    Last Post: 03-26-2006, 07:10 PM
  7. [SOLVED] Intra-workbook hyperlink: macro/function to return to hyperlink ce
    By marika1981 in forum Excel General
    Replies: 3
    Last Post: 05-06-2005, 01:06 AM
  8. Macro to Copy Hyperlink to another file as a HYPERLINK, not text...
    By dollardoc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2005, 08:07 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1