Group:  Microsoft Word » microsoft.public.word.vba.beginners

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Threads Replies Last Post
23 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  
Hyperlink.Follow method
I have a document that contains dozens of hyperlinks to other documents in our network. I have written a macro to check go through the document and check to see if the links are still valid, and if not to report the broken links. If a link appears broken the macro attempts to Follow the hyperlink (some links appear broken but actually are not - the fileexists and folderexists methods d...
1 07.11.2005 15:46:11
change path in excel.field links
Hello, I'am trying to change the file- and pathname of a lot of Excel links in a Word document. The following code i'am trying to use but it didn't work For Each Alink In ActiveDocument.Fields If Alink.Type = wdFieldLink Then ActiveDocument.UndoClear Alink.LinkFormat.SourceFullName = ActiveDocument.Path End If Next Alink Can somebody help me out. ...
5 06.11.2005 20:54:42
goto page of current selection
How do I make my current selection visible? Selection.Start = 30 Selection.End = 35 isn't enough. Thx ...
3 06.11.2005 01:35:29
Calculate Form Fields
I have never written code for MS Word. I have a document which has three form fields, "labeled" Text1, Text2, and Text3. I'd like to see some code that performs some calculations on these fields. For example, on exit from Text1, I'd like to multiple the value entered by 4. I'd like to enter a default value when entering Text3, which is the Sum of Text1 and Text. I'd appreciate your ...
4 05.11.2005 21:52:59
populating form with Palm Destop record
I'm trying to create a VBA script that will automatically create a new fax coverpage, and fill in the form field book marks with information on which ever contact is currently being displayed in my Palm Desktop software. I'm getting the info from Palm desktop by using a series of appactivate /sendkeys statements, to activate the "edit > send to > msword " feature of Palm desktop. ...
2 05.11.2005 06:36:25
Please Help - Conditional If Then code in VB
Need help again guys. My ignorance has resurfaced and I am on a deadline to complete this new checklist. So far I have written the code so that when a new doc is opened based on the checklist template, a macro is immediately started. The macro ask a series of questions using input boxes and the input is inserted into bookmarked TextFields. I need a list to form and then input that list into ...
4 05.11.2005 05:01:27
Why no BluWords in my Table? :-)
Hello Everybody, Would one of you experts kindly look over my coding and tell me why it doesn't work. In a Wd document I am trying to find (single) words, already formatted with a blue background, and copy them into an existing table which is already partly full. They will all be copied into Column 1, but we must first find where the first empty cell is in the Column. The Find routine teste...
8 05.11.2005 00:46:30
Selection Fields being both Exclusive and Inclusive
I have written some code where my check boxes can be selected exclusive of each other. Meaning, when the user click on each check box, the others are deselected. How can I change my code to where if I want to select only certain one together, but still allow for the check boxes to be selected separately? For example, Check A and Check B.....Check A or Check B...Is there any code that ...
7 04.11.2005 22:01:03
MsgBox for beginners - Help please!
I am new to VB and am having a little trouble. I want to write the script so that a msgbox will open that ask a YesNo question. Clicking yes will produce one answer in "textfield9" and clicking no will produce a different answer in the same text field. Thanks in advance ...
4 04.11.2005 19:01:55
how to delete files from a directory using VBA
hallo, my friends, does anybody know how to delete all files in a concrete directory on a disc from VBA code? p.e. in C:\reports - there are already files "....TXT" and at the start of the VBA I need to have this directory empty. thanx a lot, Lukas. ...
4 04.11.2005 01:09:55
Coding the ENTER key to move between form fields in a protected fo
Good Afternoon All, I'm new to VBA and I don't have a clue. I'm talking zero knowledge. I found a knowledge base article that does exactly what I need it to do. However, when the document containing the macros is opened and I open up a new Word document and I type some text in the document and hit the Enter Key, nothing happens. Is there some code in VBA that will apply th...
14 03.11.2005 14:58:05
Incrementally Add Space Before Paragraph
This should be so simple, but I can't seem to get it right. I can't determine which property to use. I would like to create a button that incrementally adds space before a paragraph without having to go to the Format > Paragraph dialog box to manually increase the number of points before that paragraph. I know how to do: Selection.ParagraphFormat.SpaceBefore = 12 but what I would l...
3 03.11.2005 03:01:40
Need a macro to search for specific font type
I am trying to write a macro that will search through a document for text with a specific font attribute (Comic SANS MS) then copy that text to the clipboard. After copying the text, the insertion point moves to a summary table at the beginning of the doc, where the clipboard is pasted into a table. Then I search for the next occurance of the text with the Comic SANS MS font attribute. I ...
3 02.11.2005 19:41:43
Populating a Table using VBA.
Hello NG friends, Can you please help this Newbie with two minor coding problems plus one larger one? 1. Fragment-1 below works well but is far from elegant. Is there a more economical way of generating Column Headers, please? 2. Fragment-2 doesn't work properly. The For - Next loop overwrites the first column header set up in Fragment-1. How should I change the loop to prevent that ha...
17 02.11.2005 15:44:41
I need to have a vba macro run in a template, but I don't know how to stick them together
I feel totally stupid about this and embarrassed, as I have been programming for 20 years, but I need to stuff SQL data in a word document (template) and I am clueless. I made the template, I managed to get into Visual Basic by choosing Tools->Macro->Visual Basic Editor and write some VB that should pull a recordset and write some lines. Now I have found myself wondering WTF??? I...
6 02.11.2005 13:48:00
How to make a routine that will automatically print a word file after it has been changed via an ole link to an excel file?
Hello guys. I know nothing of programming and would like to know how can I make a routine that, as I said, would print automatically a word file after it's been changed via an ole link with an excel worksheet (that implies I've changed the excel file). I would like the routine to be on the excel file, so I won't need to open the word file everytime. Also, I made the ole link and it updates...
2 02.11.2005 12:22:59
Setting some headers and footers
I have a template with three sections and a userform from which the front page title, mmm yyyy, and various headers are automatically inserted. The first two sections have headers and footers different from the third section¹s - which starts the main part of the document - and so section 3Œs header and footer are not set to ³same as previous². The form works fine if a document has only th...
2 02.11.2005 12:00:34
Shading selected selection to 5% programatically?
I recorded a test macro just now to shade selected cells to 5%. It's a macro I'll need enough to keep but the recorded keystrokes include a lot of garbage I don't need. There may be tables that have different attributes, etc., than what I recorded the macro with that will get changed. Here's the recording: ********************** Sub Macro1() ' With Selection.Cells With .S...
3 02.11.2005 02:55:31
File directory in a listbox
I am trying to reproduce a custom open file box out of WP6. I have a form with two list boxes. The listbox on the left, lstGroup, is meant to display a file directory tree beginning with a certain path. The listbox on the right, lstTemplate, is meant to display the files from the folder that is highlighted in the listbox on the left. When a user selects the desired file, it then will be opene...
3 01.11.2005 10:06:40
Run Error 13 - Type mismatch
I've searched your database for queries regarding this error, but I don't see anything that helps me. I have a form that has the spellcheck macro in it. I need to change it and when I do Tools, and Unprotect Document, so I can put in my password, I get Runtime error "13", Type Mismatch. When I hit code, it refers me to the line where I have typed the password. What do I do? Thanks!! ...
7 31.10.2005 21:19:56
Remove all contents from the Header of a document
I have some documents that are being inserted into an exhisting document. Some of the documents have headers that are changing my template. Is there a macro to get rid of all contents in a header. Including any tables that might be in there? I mean anything that is in there. Please advise. thanks in advance. ...
9 31.10.2005 04:03:06
Word VBA underlining problem.
Hello NG friends, I am trying to create a students' worksheet which identifies spelling errors by underlining them (wavy) in the text. Each error word is then followed by a short line of calculated length depending on the error-word length. On this second line the student will write by hand the eventual correction. I cannot get the code below to produce the red wavy line under the word fo...
5 29.10.2005 18:12:39
RedefineStyle Command
What's the VBA code for the Word command "RedefineStyle" (redefines the current style based on the selected text)? TIA, Andy ...
3 29.10.2005 14:59:33
Find Dialogue Box
I want to find various words in a document using the following method: I will copy a word to my clipboard, and then: Create a macro to take that word from the clipboard and find it in the text of a Word document. Here's my problem: When I double click the REC macro button and then paste the selected word into the "Find" dialogue box, that word gets permanently embedded into the mac...
18 29.10.2005 14:03:37
"Do while not"
I am trying to figure out how to modify a routine that uses Do While Not. The issue I'm dealing with is that Do While Not checks the validity of the value contained in a bookmark against a mask. However, I need to accomodate more than one mask. For example: Do While Not (CaseNumber Like "####-[A-Z][A-Z]-######-*") OR Do While Not (CaseNumber Like "####-[A-Z][A-Z]-######-A") The soluti...
3 27.10.2005 20:10:45
23 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net