Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    May 2002
    Location
    Charlotte, North Carolina, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to determine .odc filename? (2003)

    I have several documents that were set up connecting to a data source and that run a .sql statement when they are opened. I have new pc's at my users desks and for the life of me cannot figure out what the name of the .odc file should be. Is there anyway to find that within the document itself? Also, how did the person that added this sql statement do this?
    Thanks for any help...

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

    Re: How to determine .odc filename? (2003)

    The Mail Merge Wizard will automatically create the SQL statement. You can find the name and path of the .odc file as follows:
    - Activate the Visual Basic Editor (Alt+F11)
    - Activate the Immediate window (Ctrl+G)
    - Type ? Activedocument.MailMerge.DataSource.Name and press Enter.

  3. #3
    Star Lounger
    Join Date
    May 2002
    Location
    Charlotte, North Carolina, USA
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to determine .odc filename? (2003)

    I tried this, but since it can't locate the data source when it is opened, it is not connected to one and therefore the value is not returned.
    I am just starting over with creating a new data source connection to my table in SQL. The only problem I am running into now is that it is not saving the Query options that I am setting. I want the users to be able to just open the document and merge, not have to select query options each time. Any ideas?

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

    Re: How to determine .odc filename? (2003)

    Sorry, no idea. The query options should be stored in the document, and be available when the document is reopened.

Posting Permissions

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