1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

catpam

Discussion in 'Meet and Greet' started by catman, Jun 30, 2008.

  1. catman

    catman New Member

    Joined:
    Jun 30, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    Hi

    Great to a find a free site! I am fed up with signing up for expert help and then finding that that they don't know much, and then worse still not being able to cancel the monthly subcription.

    Catman is the name given to me by one of the UK users of the CAT commercial property agency system. I do stuff in Access DAO linking through to Word and Outlook.

    My current challenge is creating a hyperlink in word from two components in Access - the link and the address. I get the merge info into work, by exporting from Access to a TXT document in csv. The open WORD and merge the doc with the TXT file to vreate a form letter.

    I use this code in a Word MACRO to merge with the doc

    Code:
    Sub CatMerge()
    '
    ' CatMerge Macro   Macro recorded 3/15/2004 by pmh
    '
        ActiveDocument.MailMerge.OpenDataSource Name:= _
            "C:\catsys\mail\catmergeprop.txt", ConfirmConversions:=False, ReadOnly:=False _
            , LinkToSource:=True, AddToRecentFiles:=False, PasswordDocument:="", _
            PasswordTemplate:="", WritePasswordDocument:="", WritePasswordTemplate:= _
            "", Revert:=False, Format:=wdOpenFormatAuto, Connection:="", SQLStatement _
            :="", SQLStatement1:=""
        With ActiveDocument.MailMerge
            .Destination = wdSendToNewDocument
            .SuppressBlankLines = True
            With .DataSource
                .FirstRecord = wdDefaultFirstRecord
                .LastRecord = wdDefaultLastRecord
            End With
            .Execute Pause:=False
        End With
    End Sub
    
    
    The LINK and the address come over fine. Right now the user has to fiddle about in the newly created document with CTRL + K to make the hyperlink.

    Is there any way to do this in code behind the scenes?

    cheers catman
     
    Last edited by a moderator: Jun 30, 2008
  2. coderzone

    coderzone Super Moderator

    Joined:
    Jul 25, 2004
    Messages:
    734
    Likes Received:
    37
    Trophy Points:
    0
    wrong forum
     

Share This Page