Results 1 to 7 of 7
  1. #1
    allstar45 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    35

    Query publish to word results in removal?


    Every time I publish my querie into word, my querie gets erased. Not even deleted, just the SQL it's self is reduced to nothing "SELECT;" but I absolutly LOVE LOVE LOVE the result in word (table format)

    Additionally I am trying to autonomise the process so a comand publishes the querie from a form/button, so if you know the VBA code for that I tip my hat and thank you.

    Additionally Additionally I run a Macro on the word Doc. so if you know how to make the macro run automatically that, I would ALSO love to hear.


    bolded important stuff incase TL;DR

    Thanks,
    I appretiate any help/comments/critiques

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What is the process you use to 'publish' query to Word? I've never done this so need some orientation.

    Automation could be a command button on form that calls macro or VBA procedure.

    You have macro behind the Word document? Again, never built code behind Word. A macro in Access is different from VBA. Apparently Word also has macros and VBA. ('Macros' in Excel are really VBA procedures, at least VBA is what the macro recorder produces.) In any case, some event must trigger code (macro or VBA). It could be a button click or data entry or opening a file. Access can have code automatically run when the project opens. Same should be possible in Word. Review this http://wordprocessing.about.com/od/c...oExecMacro.htm
    Last edited by June7; 03-08-2012 at 06:59 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    allstar45 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    35
    I do not believe this is what I'm looking for, as the macro would only be run IF it came from the database in this specific querie, and that seemed to be whenever you open a new/any document.

    It's not a huge deal, the main thing is that my querie does not get erased every time I publish it.
    (from the main DB view, click Queries, click a querie to highlight it, and click Office Links> "Publish It With Microsoft Office Word"

    Edit: OK, I have discovered that instead I can run the querie, then copy it over into word there. any chance this can be done in VBA? (even if it just selects all from the table and copys to clipboard?)

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Apparently the 'Publish With Word' utility was dropped in 2007. I see only the 'Export to Word RTF File' wizard. So I can't test for your issue.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    allstar45 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    35
    Seems to also be happening if I select "Analyse with Microsoft Office Excell"

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Again, apparently dropped with Access 2007.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    allstar45 is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    35
    Alright, well anyways I'm bearing through it with reports. Exporting reports doesn't yeald the error, and the stupid page breaks, line breaks, and gpas between fields is taken care of with a Macro.

    Thanks for your time good sir, Appretiated.

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

Similar Threads

  1. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Replies: 1
    Last Post: 02-02-2012, 07:47 PM
  3. Publish it
    By Lbs in forum Access
    Replies: 2
    Last Post: 12-26-2011, 04:15 PM
  4. Time Stamp Removal/deletion?
    By thorsonb in forum Access
    Replies: 3
    Last Post: 03-30-2010, 10:17 PM
  5. Replies: 0
    Last Post: 03-15-2010, 01:53 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