Solved

VB6 and MsWord

Posted on 2014-03-22
1
191 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 500 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

744 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

8 Experts available now in Live!

Get 1:1 Help Now