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  
Range object vs. Selection object
I'm just not "getting" this conversion from Selection object thinking to Range object thinking! My code was: Sub oldCode() 'removes Doc3 from packet DoEvents ActiveDocument.Bookmarks("Doc3").Select ActiveDocument.Bookmarks("\Page").Select Selection.Cut End Sub Now, I've added another bookmark when trying to convert the code to a Range object,...
4 05.04.2006 18:09:10
Bookmarks got empty from FormFields
Is the quantity of formfields in a word document limited? In case of yes, what's the max? ...
5 05.04.2006 16:05:15
How to Format Numeric Values in Bookmarks in Word Doc.
Hi All, I have a Word template with Bookmarks in it. I have linked that to an Excel worksheet (which has my data) and I am populating Bookmarks on the Template with VBA Code based upon some conditions. The data is already formated in Excel Worksheet but when I place them in Bookmark, they loose the format. The Numeric data in Excel cell are formated as "Accounting" type with 2 decim...
15 04.04.2006 07:30:53
Accessing XML file from Word
Hi All I am doing a project where I need to be able to associate keywords with each paragraph I have in various Word documents. The keywords are stored externally in an XML file. I want document authors to be able to choose key words from the XML file from within Word by running a Macro at the end of each paragraph. This Macro should interogate the XML file and present the keywords to s...
2 03.04.2006 20:59:23
FilePrint in addin vs. attached template
I have intercepted my FileSave sub, and when I run my code as an attached doc it works great; when I run it as an addin, it fails to correctly run my "inner-code" (i.e., page 1, 2 pages; page 2, 3 pages; page 3, 1 page, etc.). Any idea how I can correct this? I'm wondering if it's running too fast or something... TIA ...
8 03.04.2006 18:58:53
Word 2003 FormFields
Hello, Does anyone knows how to erase the value of a FormField in Word with Office 2003? When I am using the code as membered (sending an empty string) below I get an error and the FormField is still having it's value. '= BEGIN CODE Public Function WriteDocFds(iBookMrkNm, iVal) 'Office2003 On Error GoTo errHandler Set ffield = ActiveDocument.FormFields(iBookMrkNm).TextInput...
2 03.04.2006 15:02:48
Header/Footer question
Hello all1 I'm using Word 2003. I have a complex header/footer situation that I'm trying to rectify. I was brought on recently as the tech writer at a firm where someone had designed a template (not a .dot) but their idea of a document template. I'm changing it in to a .dot file so I can do all the lovely things that a template allows one to do. Here's the rub: in the footer, ther...
3 31.03.2006 22:49:19
data from Excel cell into Word bookmark
Hello all, I am looking to find a method to do the following: I have an Excel spreadsheet. In this spreadsheet I have a number of cells that contain, calculated, information. In order to publish this information in a convenient way, I would like to do this with a Word document, rather than formatting a document in Excel. All I need to have is to find the code to import the contents of ...
4 31.03.2006 10:50:33
Code to check the name of the current document
Greetings, I am running Word 2000. I have a macro that runs when the document is opened. It displays a msgbox. I would like to put a check in to see if the name of the current document matches a given string. ie, if currentdocument.name eq 'z:\documentstore\mydoc.doc' then msgbox "Please use SAVE AS to rename this document before typing in this form", , "SAVE AS" what is the app...
3 31.03.2006 09:28:46
Expressions?
Two VERY beginner questions: When I see the { } parens in the examples of what to use in word form field expressions, do they need to be in the expression field as well? Also, what expressions can I use in form field calculations? For instance, in Excel I would have this formula in a cell: =IF(A1=0,SUM(A2/5),SUM((A1+A2)/8))) Is there a way I can use this type of formula in a Word fo...
6 31.03.2006 03:55:01
File listing macro for excel
Hi there. I have a problem that is driving me nuts... i want to write an excel macro that will extract the filenames from a given directory and put them in m spreadsheet. I am using the following: Public Function ShowFileList(folderspec) Dim fso, f, f1, fc, myrow Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetFolder(folderspec) Set fc = f.Files myrow = 5 For Ea...
7 30.03.2006 16:53:30
Copying cells containing line feeds from Word to Excel
[Context: automating Excel from within Word] Hello, I want to copy a single column table from Word to a spreadsheet. I know that due to an Excel feature (bug?), copied cells from a Word table are pasted in separate cells in Excel if they contain line feeds. Doing it by hand, you can get around this by doubleclicking on the spreadsheet before actually pasting the Word cell's content - ...
4 29.03.2006 09:26:06
StyleRef in Headres
I use StyleRef in headers to display the Chapter's name. I discovered that when I change the chapter in the middle of a page, StyleRef return the second chapter - which begin in the middle of the page. I want to display the first chapter - which ending in this page. How can I do it?...
3 28.03.2006 00:52:16
FAQ - Frequently Asked Questions - vba - please read before posting - unofficial March posting
FAQ = Frequently Asked Questions - brief - vba - unofficial This FAQ is posted weekly.- more or less Please save us all some time by reading it before posting to the news group. This newsgroup is about VBA - Visual Basic for Applications - which is the programming language for Word 97-2003 (macros). There is a longer FAQ with more questions and links that is regularly posted in the non...
4 27.03.2006 12:48:25
Replace word of specific length
Hi, I have a document that I would like to convert to a cxv file. But before I do there are some strings that I would like removed. They are all 5 characters in length, comprised of only numeric characters (0-9) and begin with the number 7. Does anyone have any examples of VBA code that does this sort of thing? TIA, Jarryd ...
4 27.03.2006 09:25:32
vba code to select all occurrences of some text
Hello, I am using Word XP, which allows users the option to "highlight all items found" in the Find dialog box. I record a macro for such an action, but the macro would only highlight the first found item. l look through the Help file, but could not find any properties/methods of the Find object that would highlight all found items. Suggestions are most welcome. ...
7 26.03.2006 00:41:25
log to a remote computer with a user name and password
Hello I need to be able to execute an exe file that is stored on a remote computer in my LAN (I have the share path \\192.168.1.130\Lex\Lex.exe). But first I need to log to that computer through its IP (for example, 192.168.1.130) and user login and password (I know these, too) . Is there a way to establish that connection using VBA from within WORD and to be able to execute the file st...
2 26.03.2006 00:19:38
Mail Merge on Labels with Matrix Printer from txt file
Hello, I am working on the following project: I have to print a mail merge on Labels from a table in form of txt. This txt file does not contain column headings, which apparently already represents a problem with Word. I would like to write a Script, so that the user only has to select the concerned txt file in a form then the mail merge is provided and one can print. Who can help me or...
2 25.03.2006 07:29:53
check whether a word document is opened or not
Hii all..... I have prepared a project in which i am opening a word doc,and then saving it as test.doc. Now obviously if test.doc is opened already(i.e.before the execution of form) then it won't save it in test doc so how can i make sure test.doc is not already open. Expecting help as soon as possible........ Regards Pooja ...
2 23.03.2006 11:01:23
Option Button Values
Thanks for the help yesterday -- greatly appreciated! So, I'm in the home stretch, but this is proving very hard to track down, so I'll just outline what I'd like to do. I have a Word document which is a locked form. One one page there are 7 criteria for review; each criteria has a set of 7 option buttons, grouped. They should range in value from 1.0 - 4.0, by half points. The review...
4 22.03.2006 20:57:23
Select a line based on a string
Hello All, I am looking for a way to search through an entire word document to find a line beginning with a particular string (multiple words). On finding this, I need to assign the entire line of text where it is found to a variable. Really, I only need the text after the string up until the end of the line, but atleast if I get the entire line I can work with that. Any help would be grea...
4 22.03.2006 01:04:24
New to VBA - Calculation Validation?
Hi there, I am trying something I think is simple, but can't get it to work (I am very new at using Word for form field calculations, but my office does not want to use Excel). I have five fields that are percentages (Obj11-Obj15). The user enters amounts into up to five of them -- so, they could enter numbers into only four, as long as the total field (Total1) equals 100% when they're ...
2 21.03.2006 18:35:53
"Cleaning up" Range object
So, long ago I was advised to use the Range object over the Selection objection in many cases. Finally, I am able to spend a little time re-writing my code with Range objects. (Perhaps this will solve many of my issues, and make my code less sloppy.) Suppose I have a cell in a table whose text I want to "juggle" (i.e., as I easily do with the Selection object, in my old way of thinking --...
12 21.03.2006 14:42:18
Can address label pages be sorted?
I have 5 pages of address labels that I would like to sort, looking for duplicates. Is there a way to sort them? I am using Word 2003. Thanks ...
2 20.03.2006 21:32:57
Why does this code fail?
Hello all, Would someone be so kind as to look at the following and tell me why this code is intermittent/fails? Is my logic faulty? With Dialogs(wdDialogFileSaveAs) If Dir("J:\LASER\" & PATH & "\") <> "" Then .Name = "J:\LASER\" & PATH & "\LaserAddressSimulation.doc" Else .Name = "J:\LASER\LaserAddressSimulation.doc" End If .Dis...
4 20.03.2006 21:19:46
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