Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlinks with mergefields (Word 2000/02)

    I have a problem with placing mergefields in a hypertext link that is directed to a site that then takes the infomation from the mergefields to populate an on-line form. The problem is that the mergefields in the hyperlink are not automatically updated on merging and still contain the field codes rather than the results of the merge. I have to update the hyperlink using F9. Is there anyway I can automate the updating of the hyperlink once the document has been opened and merged? I want to be able to click straight on the hyperlink in the document and go straight to the web site without having to F9 the link every time.

    Many thanks, I hope someone can help. <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>

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

    Re: Hyperlinks with mergefields (Word 2000/02)

    You should be able to do the equivalent of the F9 key in VBA after the mail merge has been completed - is the whole process being driven by VBA or is it a manual merge? What is the source of data for the merge process?
    Wendell

  3. #3
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks with mergefields (Word 2000/02)

    Hi Wendell,

    Thanks for mailing. The data comes from a SQL database and VB software opens Word and performs the merge. We want this to be automated as the user will select to merge the document in our software and then view the results to ensure they are correct. They will then just click on the hyperlink to open a web site and automatically populate the on-line form from the contents of the Hyperlink (which is mergefield information). Its not really practical to expect them to F9 the document before using it.

    I had thought about including a macro in the document that runs on opening but I'm not sure of the order will be correct. It will have to perform the F9 update AFTER the merge has taken place. Any ideas?

    Thanks JOTO

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

    Re: Hyperlinks with mergefields (Word 2000/02)

    If you open Word and perform the mailmerge in VB/VBA, you could add an instruction

    objWordApp.ActiveDocument.Fields.Update

    after the .MailMerge.Execute instruction you most probably use to do the actual merge.
    objWordApp should be replaced by the object variable of type Word.Application you're using.

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

    Re: Hyperlinks with mergefields (Word 2000/02)

    Good Morning Julie,

    When you say VB software, is it actually a VB application, or is it an Access database that uses VBA to to the merge? (We frequently do it from Access - very powerful). Is the merge doing a single document, or does it create a complex document with several sections as a form letter merge would? If it's a single document, it should be pretty straightforward as Hans suggests in his response. If it's more complex then it seems you would have to separate the merged document into separate documents - but maybe I'm making more assumptions than I should? And who initiates the merge - is it the user? And if so do they have to save the document(s) in some fashion.

    It's probably too late for reconsiderations, but it seems that using the SQL database to drive the web site with it's online form would be a more straightforward and friendly interface - just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>.
    Wendell

  6. #6
    Lounger
    Join Date
    Jul 2002
    Location
    Wellington, North Island, New Zealand
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks with mergefields (Word 2000/02)

    Hello Wendell,

    Yes it is a VB application. It opens up the Word document and it is a single document not a complex multi-page merge document. I have passed the mails on to the developers and they are going to try the suggestions. I think initially they saw it as a Word problem that needed to be solved in Word and so I got involved but now they are going to try to build in the update as part of the instructions for opening and merging the document via the application.

    The web site is out of our control as its a standard site for on-line Searches for Conveyancing so they tell us the format they need to populate the form and we just write the software so our application can use the site.

    Thanks for the help, I will let you know if we need more advice.

    Take care, Julie

Posting Permissions

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