?
Solved

VB6 and MsWord

Posted on 2014-03-22
1
Medium Priority
?
199 Views
Last Modified: 2014-03-26
HI Guys,

looking for a snippet of code which demonstrates:

1. locating a bookmark in a word document
2. replacing that bookmark with a table (any table for the purposes of an example) with a font of 9pts.

MTIA

DWE
0
Comment
Question by:dwe0608
1 Comment
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 39948452
This snippet assumes the document object variable (doc) has already been set
Dim tbl As Word.Table

With doc
    Set tbl = .Tables.Add(.Bookmarks("bmkTable").Range, 5, 3)
    tbl.Range.Font.Size = 9
End With

Open in new window

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

807 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