find .ACC file of my .ACCDB file RRS feed

  • Question

  • I linked data from query in ACCESS file to WORD file by these lines:

    DDEAUTO MSAccess "C:\\Users\\ester\\Desktop\\AF60~1\\52AF~1.ACC;Query שם מלא של תלמיד נוכחי" FirstRow \t  \* MERGEFORMAT

    my access file got a password so I linked the data by ".acc" file and I don't remember how to do this again.

    As you can see, I used hebrew letters for the folder, accdb file and query names.
    The folder and the data file have the same name (מסד מכון הוראה)
    my purpose is to replace these names with english letters (for same files) or learn how to do this data link again (the password stuck the linking)


    • Edited by omerwin3 Monday, January 23, 2017 11:26 PM
    Monday, January 23, 2017 11:21 PM

All replies

  • DDE is rather ancient technology and I don't know that it is even supported for the newer Office documents and Access. Can you use the mail merge features instead?

    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, January 24, 2017 12:08 AM
  • Hi,

    >>I don't remember how to do this again.

    I think you might get the field by pasting the query as link in the word.

    Or maybe you use an earlier version of Word to add the field.


    >>my purpose is to replace these names with english letters (for same files)


    To replace these name, you could use the macro below in the word, but make sure the query name has been changed in Access.

    Sub test()
    'For Each fld In ActiveDocument.Fields
    Set fld = ActiveDocument.Fields(1)
    If fld.Type = wdFieldDDEAuto Then
    fld.Code.Text = Replace(fld.Code.Text, "OldName", "NewName")
    End If
    End Sub

    According to Field.Type property  and WdFieldType enumeration,

    Dynamic data exchange (DDE) is an older technology that is not secure. If possible, use a more secure alternative to DDE.

    DDE/DDEAuto field. No longer available through the Field dialog box, but supported for documents created in earlier versions of Microsoft Word.

    So you may consider to use mail merge feature as Paul suggested.





    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Tuesday, January 24, 2017 4:30 AM