Results 1 to 10 of 10
  1. #1
    frcastro is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    13

    Open a word dotx from acess

    Hi,



    How can I open a word document from a acess macro. In that doc i have information from my access database.

    Thanks!

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    yes.

    look into docmd method and openfile

    as for the data being in the Word doc - one presumes you have already set up a Mail Merge template in Word.....

  3. #3
    frcastro is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    13
    Hi,

    how can I remove the message of sql accessing the database from my word template,

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    I would suggest this:

    a. make a query in Access that supplies the raw data that you want. Give the query a name, save it.

    b. then go to Word - create a new MailMerge Word document and point it at that query as its data source. Obviously give the doc a name, save it.

    Then when you manually open the Word doc it should have the data merged.

    Once all this is working manually - - then all you have to focus on is auto opening that Word doc from Access.

  5. #5
    frcastro is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    13
    Now my problem is when i open the doc file it says that it is a document using SQL and if i want to allow this.

    A simple click in yes bottom solves the problem.

    But I want to skip this thing so my application works more fluently.

    Thanks!!!

  6. #6
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Most likely you're talking about the prompt where Word is asking if you would like to update your Mail Merge based on your Query results.

    There's really no way around it if that's what's happening. If it's some sort of security prompt though, then you may be able to fix it by lowering your security settings in Office. However, that will need to be done for everyone using the document. And it can make you more vulnerable to Macro viruses and such so I don't recommend it.

  7. #7
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    or check a Word user forum - possible a guru on that side knows the answer to that question of the sql prompt....

  8. #8
    frcastro is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    13
    I give as acquired now that i can do nothing about that.


    I have another problem!!

    I want to allow some one that presses a bottom to automatically generates the word document. I already maneged that bu i have some problems with the query that the word uses.


    How can i run a macro to force a querie to have a certain criteria in a certain field. Using the [] in the design view does not word because of the word export.

    maybe macro runSQL using a certain function??


    Thanks all by helping me.

  9. #9
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    For that, I'd recommend using a Temporary Table. Then you can have your button replace the contents of that Table based on the Query.

  10. #10
    frcastro is offline Novice
    Windows 7 Access 2007
    Join Date
    Jun 2010
    Posts
    13
    how do i do that?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Open Word Doc in foreground
    By patrickmcdiver in forum Programming
    Replies: 1
    Last Post: 03-02-2010, 12:26 AM
  2. Replies: 2
    Last Post: 02-26-2010, 08:14 AM
  3. Acess autopopulate a query
    By stendec in forum Access
    Replies: 0
    Last Post: 10-20-2009, 03:49 PM
  4. Replies: 1
    Last Post: 06-04-2009, 07:43 AM
  5. Acess 2007 Validation Problem- HELP!?
    By JackLowe in forum Access
    Replies: 1
    Last Post: 04-20-2009, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums