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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Access Data into Word Document

Status
Not open for further replies.

spizotfl

MIS
Aug 17, 2005
345
US
Using the information found here: thread702-1454687 I have managed to get all of the access data copied into the relevant portions of the word document.
The question that I have is if it is possible to insert the data while maintaining the spacing layout of the original form? I have a form in Word that cannot be rearranged, the way it is is the way it needs to be. I am thinking along the lines of how the 'Insert' key works where you can overwrite the existing spaces in the doc. The data won't be any larger than the existing spaces on the form.
Thanks for any help

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Would any of these help?
How do I... Dynamically fill Microsoft Word fields using Access data?


How do I... fill Word form fields with Access data?

How do I... Fill a Word table with Access data?

Also, would mail merge work?
 
I don't think these will work the way I want. They involved setting up forms in Word as part of the creation process. I am dealing with a form that was designed to be printed and then filled in by hand. None of the fields are useful in the way that these articles point to. Thanks for these, though, they will probably be useful in some of the other things I'll have to do.


"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Let me try and rephrase the issue, perhaps that will clarify what I am trying to do.
I have a word document that has a set layout the needs to be maintained. The users have to submit this form in its current layout, and I have no control over it.
One of the users has asked me about putting together something in Access that compiles the same data, and if possible, can export that data into the Word document.
I have used Bookmarks to set the insertion points for the data, but with the way the document is setup, when the Access data is inserted the lines wrap onto the next line. I want the inserted data to "overwrite" the series of underscores (_____) that are set in the form. That way the lines of data won't wrap, and the original layout will be preserved. The data in Access won't be larger than the available space in the Word document.
I can't change the Word document layout in anyway, but adding Bookmarks should be acceptable.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
It is possible to select a number of character, for example:

Code:
.ActiveDocument.Bookmarks("Bookmarkname").Select
.Selection.MoveRight Unit:=wdCharacter, Count:=Len(Forms!frmTest!txtTest), Extend:=wdExtend
.Selection.Text = (CStr(Forms!frmTest!txtTest))

 
Can you change the underscores in the Word document to a graphical line from the Drawing toolbar as should have been done in the first place? An underscore is, as you know, an actual character whereas the line is graphical and can be anchored. From your posts, that might solve the problem.
 
How are ya spizotfl . . .
spizotfl said:
[blue] . . . it is possible to insert the data while maintaining the spacing layout of the original form?[/blue]
Then you say:
spizotfl said:
[blue] . . . I want the inserted data to [purple]"overwrite" the series of underscores (_____)[/purple] that are set in the form . . .[/blue]
Be aware: a [blue]Bookmark[/blue] in word can be set in two ways:
[ol][li]At the cursor insertion point.[/li]
[li][purple]A hilited section of text![/purple]

If you hilite an underscore string and then set the bookmark, your problem should be solved. When the bookmark is selected, the underscore string will be hilited for replacement! [thumbsup2][/li][/ol]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thanks for the input everyone. Modifying the bookmarks seems to be the easiest solution. If I have any more questions, I will let you all know. Thanks again for always being there with good suggestions.

"Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything."
-Vonnegut
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top