Quantcast
Channel: Word VBA Beginners
Browsing all 106 articles
Browse latest View live
↧

VBA Word Count

Hi, couple of minor problems. I wanted to help my wife with a macro that would count all the words in the document and also the number of words in bold. I can't even get to first base on this because...

View Article


Interrupting a macro

Hi all, Hoping I'm in the right place for that question. I have a macro which scans a file, word by word, inserting some sequences of characters according to some conditions. This macro must sometimes...

View Article


How to Reset ButtonName and Filters in msoFileDialogOpen?

I am using msoFileDialogOpen or msoFileDialogFilePicker to select specific files. After I use the procedure "FilePath_FolderPath_1" below, the other procedure "FilePath_FolderPath_2" gives you the same...

View Article

Set a suggested directory with vba from access

I have a form in msaccess 2003 that has a textbox field [CaseFolder] that contains a full path folder name. I have msaccess code on that form that opens Word. I would like, at that point, that when the...

View Article

Intercept Word Build-in commands using VBA ?

Hi all, In Word 2007 I'm looking to detect a manual TOC update in order to automatically turn OFF and ON Word's Review mode. For the moment, the only clues I'm aware of are based on "events catching"...

View Article


disable print option for web page

I have a word file which saved as web page. I placed following codes to disable printing for this file. If I open the file with MS Word, the codes work perfectly well. However I do not want the user...

View Article

Excel search Word docs?

Our primary data is stored in Excel 2007 workbooks, but some of our other data is stored in Word 2007 documents. Is it possible to put a macro in our Excel workbooks that uses any ADO techniques to...

View Article

SpellCheck code and Word 2007

I have used this code *forever* in my protected documents without fail. http://word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm As my company moves to Word 2007, I do expect hiccups. A customer is...

View Article


Added two fields on the form "x / y" in the top cell in a table oftwo rows in...

Hi - After many attempts, I have almost given up. Hoping to find help in here. Should have added two fields on the form "x / y" in the top cell in a table of two rows in the footer. The code below...

View Article


StyleRef problem

We generate our MS-Word 2007 documentation from an app called Author- IT (AIT). For some reason ( can't figure out why), AIT places 2 hard returns after a style we use to display the release date,...

View Article

Templates causing problems with email attachments

7 years ago I developed a series of templates for approximately 50 coworkers and have had no issues of any kind until we recently updated from Word 2000 to Word 2007. Since then, we've started to...

View Article

Re: Keeps asking to save/change normal.dot after I've thrown data from VB6 to...

Hi All I just can't pin this one down. I have a vb6 app that connects and throws data at a MS Word doc template that I've pre-created. The doc population works fine (ie a copy of the template is used...

View Article

Stop a Find.Execute loop

Hello, This is probably easy, but I don't find the answer. Here is my macro (Office 2007). It enumerates my titles, but when reaching the last one, it loops over it again and again. I have tried the...

View Article


Increment Bookmark name?

I have an english and a spanish version of a word form. I have created a macro to check the corresponding box in spanish when the english box is checked. However, the bookmark name is hardcoded in the...

View Article

VBA to update TOC

I've written a very simple VB Word macro to update the tables of contents in a Word file but would like to extend this to include a table of tables. The document includes a Table each of Contents,...

View Article


Adding picture into activedocument shapes

Hi Everyone, I have a following code for adding bmp pictures which are named from 1 to 250, into activedocument shapes which are named from image1 to image250. It seems like I am doing something...

View Article

Default Directory

How do I change the default directory the dialog looks for the pictures in (eg. I would like the macro to look first in the folder where the document resides. Thanks!!

View Article


If...Then...ElseIf written as a Select Case Statement

Hello. Select Case Statements confuse me. The scenario - In MS Word, I have a UserForm with a listing of choices (AutoText) using OptionButtons. The choice will be inserted at a bookmark (which I can...

View Article

Macro to protect/unprotect document

I am creating a template in Word 2003 that is protected for form fields. I would like a macro to unprotect the form (retaining the data in the form fields) so that users can edit the footer. I would...

View Article

VBA Code does not work in a word document

I have vba code in a word document. I would like to use this documentwithin the office, but the problem is the code doesn't run for anyone but myself. When they open the document, the code is not...

View Article
Browsing all 106 articles
Browse latest View live