|
Macro for Mass Find and Replace
I am looking for a way to emulate the Find & Replace function in Word.
However, I would like to Find multiple selections and uniquely Replace
each one (after having pasted them each on a new line at the beginning
of the document/template).
For example, I have the word "Bob" and "Jon", and I would like to
replace each occurrence with "George" and "Fred", respectively.
I have the following...
|
23 |
01.09.2006 11:59:21 |
|
Desperately need code to automate Access 2003 from Word 2003
I have a Word document that is filled with data. I set up a button on
the document where the user is supposed to click on the button and run
VBA code. The code is supposed to open an access database and run a
select query and then insert new data into the access database. The
database is in the same directory as the document. I am limited to
starting it from Word with the button. The button works...
|
7 |
31.08.2006 15:03:31 |
|
Word Template in Startup folder loses dll references
A Word template located in the User's Startup folder repeatedly loses
references to DLLs. This causes macros to fail to run, and to generate the
following dialogue box error message: "Compile error: Can't find project or
library". For example, when the ("Compile error:...") dialog box error
message appears, the word "Left" is highlighted on the following line:
strPathTest =...
|
4 |
31.08.2006 14:28:00 |
|
Checkbox to Unhide Text
Hi Folks - real beginner here with VBA in word, surrounded by technophobes!
Am trying to do a protected form letter. Users enter details in form fields
which populate through the letter using Cross references. There is one
paragraph that I need to insert/remove based on the user checking a checkbox.
(Checked = include the text, unchecked = exclude). My code is below, but I
get a 'Runtim...
|
3 |
30.08.2006 22:54:02 |
|
ListBox_Click event does not work!
I used ListBox couple of times and each time the click event worked fine,
but in one particular userform the ListBox_click does not work!
However it "works" when i set listbox selected value via code, for example:
ListBox1.Selected(0)=True
but when i click a value on the listbox, the event simply does not "fire"...
I checked this by placing the breakpoints inside of the click event. O...
|
3 |
30.08.2006 09:15:44 |
|
RE: Opening Excel for editing
Hello,
I have a Word form that has a user form within. In this user form some data
is entered and thus written to another Word form. I would like to open an
Excel for and write some data to a cell, how can this be done? Below is a
code snippet for the Word document, I would like to write the same data to
the Excel document named 'jobs.xls'. Thanks
Documents.Open FileName:="C:\!...
|
2 |
30.08.2006 03:37:14 |
|
Insert File - Font mysteriously changing.
Hi!
I have been inserting a file into a word document.
Selection.InsertFile ("C:\Dale\Vision\Renewal Letters
Production\Employer\Vision Renewal Rate Increase Employer Final.doc")
There is additional logic in the VBA that determines which files to
insert.
The original file is in Font Size 10. However, when it is inserted it
immediately changes the font size to 12. Interestingly whe...
|
2 |
30.08.2006 01:15:33 |
|
SUB test(anyparam) -- VBA does not allow params!?
Hi group,
this one is strange: I want to write a SUB-procedure with one parameter like
this:
Sub sh_info(shselect As Integer)
Select Case shselect
Case 1
msg = "Some message text"
Case 2
msg = "Different message"
End Select
End Sub
But, the proc won't execute. Not by pressing F5 (nothing happens) nore by
calling it from a different sub. As...
|
22 |
29.08.2006 09:38:02 |
|
Re: Bold all cross-references
The truth is, I more often copy within documents than between documents.
My problem is that my documents are laid out with repetetive steps, like
this:
1. - description of something with cross-references to the following table
and figure
- table of something (with a table caption)
- figure of something (with a figure caption)
2. same as 1., etc...
So, you see how e...
|
1 |
29.08.2006 05:03:37 |
|
Bold all cross-references
Is there a simple macro that can bold all the cross-references in my doc?
It's been a few years since I've handled VB and I don't have the time to
fuddle my way through right now.
Thanks in advance.
...
|
5 |
28.08.2006 10:31:01 |
|
Form Automation
I am currently in the processes of creating a monthly report for an
organization to fill out monthly , but I have run into a bit of a road
block. I am looking for a way to to have the following inputted into
my form when a user needs it:
Date and time of event: Program Length (hrs):
# in attendance: # of members in attendance:
Title of Program:
Types of publicity and area pu...
|
2 |
26.08.2006 18:55:23 |
|
Shelling Wordpad
Hi all
Wonder if anyone can help...
I am shelling wordpad in vba code but wordpad doesn't seem to like
spaces in the filename.
My code...
Private Sub cmdNotepad_Click()
Dim varX As Variant
Dim strMyDoc As String
strMyDoc = "C:\Documents and Settings\Doc\My Documents\Nis2.rtf"
'strMyDoc = "C:\setup.log"
varX = Shell("C:\Program Files\Windows NT\Accessorie...
|
6 |
25.08.2006 15:14:45 |
|
read per word until the end page(page break)
Hi,
I tried to read per word from my table of content below and write per
paragraph
into the text file.
It's not working since it only read the first 3 lines and after that I
always get 'bad parameter' message error due to tab error in the table of
content like:
1.3 Test
1.3.1 Error read this line.
Would anyone know how to read per word and write value per line in text file
unt...
|
5 |
24.08.2006 07:59:55 |
|
Simple macro to copy paste special pictures
Hi,
I am preparing a document where I have to take many screen shots and paste
in word document.
I prefer pasting the document by Ctrl+V function, then again do Ctrl+X and
goto Edit, Paste Special and select Picture option. I do this option as the
visibility of the picture is more clearer when done paste special.
Can there be a macro written where in with a short cut/click of a but...
|
2 |
24.08.2006 07:14:05 |
|
Adding a Font size in Word
I am asking is there a macro that I can add that will add 40 as a font size
in the drop down list for font sizes?...
|
4 |
24.08.2006 02:26:54 |
|
VBA permission errors
Helllo All,
I have the following code to copy a file to a newly created folder.
JobDirectory = 'c:\Job Files\"
JobNumber= 'B 06-100"
JobName='Construction"
Why am I getting a permission error, this all happens on my laptop, no
network.
Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "C:\Job Setup\Project Information.doc...
|
2 |
23.08.2006 08:55:47 |
|
Short cut keys within protected documents
Hi there I am trying to write a piece of code to attach to a word template
that I have created that is a protected document as it has form fields in it.
What I want to do is to be able to either use the insert symbol menu or to
be able to use shortcut keys within the document. Any suggestions...
|
2 |
23.08.2006 08:54:01 |
|
vba ms word - read line from table cells
Hi guys,
I 'd like to read line by line in table cells. I have 3 lines in table cell
and would like to read line by line in these table cells and put this line
into a variable. Would any of you know how to do this?
Please help :(
Any help would be greatly appreciated
Many Thanks!
...
|
10 |
23.08.2006 03:36:34 |
|
Macro for WordArt?
Does anyone know of a macro to do the following please?
Start with a 5 page doc WordArt.doc containing WordArt entries of
various types and colours. The text string is identical in each case.
I want to change the text just once, to get a fully revised document.
IOW, instead of selecting each entry one by one and using Edit Text,
which would be very tedious.
Any help would be much appreci...
|
3 |
22.08.2006 18:30:22 |
|
How can I get such a contenst like this?
a----------(1)
b----------(3)
c----------(5)
d----------(9)
the default is no brackets.
I have used the "Shift+Ctrl+F9",
I would like to find other ways.
thanks.
...
|
8 |
20.08.2006 15:53:24 |
|
Remove Specified Text But First Occurence
Hi, folks. Could you please share VBA code that would search
an open Word doc file entirely, and remove all instances of a
specified text, except the very first instance?
For example, if my open doc file had 4 instances of the text
"supplies", then the desired VBA code would remove/delete
the last 3 places where "supplies" appeared, but keep the first
instance of it, as is, where it is.
...
|
3 |
20.08.2006 09:50:14 |
|
VBA to Show Directory of Doc Files
Hello. Could you please share with me the VBA code that will
show a list of all the doc files within a directory, allowing you
to make a selection. (I think this is called a dialog box). And then,
once a file choice has been made, it will open that file, and store
the file's path and name to variable xfile.
Thank you for your help.
Wayne
...
|
2 |
19.08.2006 23:12:56 |
|
Re: Word was unable to read this document. It may be corrupt.
here is the file
"Carlos Bastos" <cbastos@gmx.co.uk> wrote in message news:...
> Hi everybody,
>
> I am having a Word document that I cannot open
> receiving
> the well know message from Word 2003.
>
> Word was unable to read this document. It may be corrupt.
> Try one or more of the following:
> * Open and Repair the file.
> *...
|
1 |
19.08.2006 08:59:24 |
|
Word was unable to read this document. It may be corrupt.
Hi everybody,
I am having a Word document that I cannot open receiving
the well know message from Word 2003.
Word was unable to read this document. It may be corrupt.
Try one or more of the following:
* Open and Repair the file.
* Open the file with the Text Recovery converter.
(C:\Documents and Settings\...\test.doc)
The Document form Microsof...
|
1 |
19.08.2006 08:57:48 |
|
VBA Resources
Hello. Can you fine folks suggest websites and books and CD
material whereby I can better learn Word VBA? And, if you
could, please indicate if the resources you're suggesting are
for Beginner, Intermediate, or Advanced users.
Of course, I'd like info pointing to all three categories. :)
Thank you for your help.
Wayne
...
|
3 |
18.08.2006 22:02:26 |