Solved

MS Word Visual Basic Mergefield Help

Posted on 2000-03-07
3
514 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows ICD FFU Issue 4 106
How can my static class become undefined?? 8 94
RUNRMTCMD from AS/400 13 129
How Do I Widen a Column in a SharePoint 2013 List 2 65
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

739 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