Solved

MS Word Visual Basic Mergefield Help

Posted on 2000-03-07
3
511 Views
Last Modified: 2013-11-25
Help!  I am writing a simple program in Word Visual Basic and I need to copy a users response on the form to either a mergefield or a "REF" Bookmark in the Activedocument.

The logic behind this is simple but the syntax is driving me nuts and I feel like I'm about to smack someone.

Thanks!

rick detroit
0
Comment
Question by:saksafon2
3 Comments
 
LVL 1

Expert Comment

by:okcman
ID: 2594591
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=3451

this is the source code of an excellent mail merge example this should help you do everything you need
0
 
LVL 1

Accepted Solution

by:
Kurvy earned 50 total points
ID: 2594742
dim wrdObject as word.application

.......... your code
as you got this far I will assume that you are OK with opening the document

........

wrdObject.activedocument.bookmark("MyBookMark").select
wrdobject.selection.insertafter Text1.txt
0
 

Author Comment

by:saksafon2
ID: 2596222
I almost gave up.  Thanks for your help.  I'm now on the right track and can actually start writing this program.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question