Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 April 4th, 2005, 09:23 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Import Data from a form to a word package

Hi

I am trying to import an address from a customer details form to an invoice in word, but it seems to not work. I have below shown two different types of codes that I have tried to use, but they both do not seem to work.

Can you please help!

Aysha

Dim frmCustomerDetails As Form
    Set frmCustomerDetails = Screen.ActiveForm

    oApp.Selection.GoTo Name:="Address"

    Dim txtContact As Control
    Set txtContact = Forms!frmCustomerDetails![CustomerID]
    txtContact.Value = [Address1]

    TextToWrite = " " & frmCustomerDetails.Table![Address1]
    TextToWrite = TextToWrite
    If Replace(TextToWrite, " ", "") <> "" Then oApp.Selection.TypeText Text:=TextToWrite & ""






Similar Threads
Thread Thread Starter Forum Replies Last Post
package and import problem Prince Java Basics 0 May 29th, 2006 06:49 AM
How to import word file in Data report in vb Subuana Beginning VB 6 0 April 3rd, 2006 06:20 AM
CH7 - import package kizmit JSP Basics 4 June 16th, 2004 08:00 AM
import data from web form Mitch Access VBA 8 September 4th, 2003 04:26 PM





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