Hello all-

Im running a macro in Word. It runs when you open the document and its a mail merge doc. I need it to find the db in the folder where the form is located...(App.Path in VB) I know its Application.Path in Word but I paced that in and im getting syntax error among others my code is below... can anyone help? Thanks!

VB Code:
  1. Private Sub Document_Open()
  2. CommandBars("Mail Merge").Visible = True
  3.     ActiveDocument.MailMerge.OpenDataSource Name:= _
  4.         [COLOR=Red]" & Application.Path & "\Tracking Data.mdb", ConfirmConversions[/COLOR]:= _
  5.         False, ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
  6.         PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
  7.         WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
  8.         Connection:= _
  9.         "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data [COLOR=Red]Source=" & Application.Path & ";Mode=Read;Extended Properties="""";Jet [/COLOR] OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engin" _
  10.         , SQLStatement:="SELECT * FROM `FarmingTemp`", SQLStatement1:="", SubType _
  11.         :=wdMergeSubTypeAccess
  12.     ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
  13. End Sub