Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word EditGoto Destination

Status
Not open for further replies.

DBrack

MIS
Mar 12, 2004
33
US
I am using an access form that loads the data into a word document and shows the completed ms word document.
The word document can later be prined or saved. The code has several references top the word document as shown below

WordObject.AppShow
If WordObject.AppMinimize() Then
WordObject.AppMaximize
End If

If Not IsNull(txtAB_NUM) Then
WordObject.EditGoto Destination:="txtAB_NUM"
WordObject.INSERT Trim(txtAB_NUM)
End If

The database users are able to see the word document. I am not able to. It doesn't load a document at all. I tried putting an empty document. When I run the application, it opens it, but doesn't populate the document according to the code. When I debug it, it exits at the first If condition. The users sample document provided has numerous horizontal lines, boxes, color shades etc.. The code doesn't seem to be doing that many things. Could they be using any formatted template? If so, I'll ask them.

Thanks in advance
 
How does Access know what to put where in the MS Word template that you have?

Here is what I did.
1. Create a recordset of data that will be put into the MS Word letter/template thing.
2. In the MS Word file, I have created fields that show where the data is to be put.
3. Also, EACH and EVERY field that I have in the MS Word file is bookmarked.
4. In Access, I go thru each record (from #1 above) and each field in the record and call out the bookmark then put the data at that bookmark (which will replace the field that was there).

Does that help?
Questions?

Let me know.

C-D2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top