Solved

MS Word Visual Basic Mergefield Help

Posted on 2000-03-07
3
509 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 56
Visual Basic Excel Formatting error 4 83
WPF issue with Trigger 2 95
Having a different time zone on your task bar 3 53
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now