Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 25th, 2008, 11:22 AM
Authorized User
 
Join Date: Feb 2008
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hewstone999
Default Interacting with Word

I have this code (Access VBA) at the moment that uses Bookmarks to insert information into a word doc.



Code:

Private Sub Command0_Click()
Dim Wrd As Object
Set Wrd = CreateObject("Word.Application")
Dim Mergedoc As String
Mergedoc = Application.CurrentProject.Path
Mergedoc = "C:\Documents and Settings\rhewston\Desktop\Testing2.doc"
Wrd.Documents.Add Mergedoc
Wrd.Visible = True



With Wrd.activedocument.bookmarks
    .Item("Title").Range.Text = "Lorenzo Initial Validation Export Resource"

End With

End Sub



Is there a way I could use SQL queries to popular the word doc i.e. Insert * From Table1 - either as text or in a table.

Any ideas or help?







Similar Threads
Thread Thread Starter Forum Replies Last Post
interacting with active directory programmatically ms_kout ASP.NET 2.0 Professional 0 November 22nd, 2006 01:37 AM
Web page interacting kuzbari C# 1 March 19th, 2006 01:28 PM
Interacting User Controls [email protected] ASP.NET 1.0 and 1.1 Professional 4 March 27th, 2005 06:11 AM
Interacting with Server's Desktop CCSBuz Classic ASP Professional 0 February 13th, 2005 02:26 AM
Interacting with MS outlook n windows start up surbhi Pro VB 6 0 September 27th, 2004 04:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.