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

Geek News

Threads Replies Last Post
275 Pages: <<  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  >>  
Text Form Field - Number Format Problem
I am creating a (Word 2003) protected form using Text Form Fields to accept input (and to perform a calculation on previously input Number fields). The Number Format dropdown box in the Text Form Field Options menu where the Type is Number, offers only a limited set of number of available formats. One of these formats, £#,##0.00;(£#,##0.00), can be edited to £#,##0;(£#,##0) to allo...
4 6/26/2007 8:08:34 AM
Word templates on new server are inaccessible when old server is o
A group of Word templates was created on SERVER1 some years ago. The original server location is reflected in the file location field code in the footer as \\SERVER1\[template location]. A couple of years ago, the templates were MOVED to \\SERVER2\[template location] where users have been accessing them without a problem using Word 2003. There is no copy of the templates on SERVER1....
2 6/26/2007 6:45:56 AM
Performance better with For...Each or For i=1 to... loops?
I'd read online that For...Each loops were faster in general than using a counter. However, in the following code, AltMergeTable is running much faster than MergeTable. Did I get bad info about For...Each being faster? Or is it true in other circumstances? I know I could (and will) do a lot of testing, but I'm curious to know if there are any rules of thumb you can suggest for deciding ...
8 6/25/2007 10:49:42 PM
printing VB macros
Is there any way (i.e., a macro or builtin) to print all the macros in a VB project? Or to copy them to a Word file? (Particularly where there are many modules and it’s a bit of a pain to copy and paste all the modules into Word manually.) I’m using Word 2003 at the office, but Word 97 at home....
9 6/25/2007 10:47:39 PM
Tray 3 not recognized in HP color Laserjet 4700
We were having HP color Laserjet 4600 before. We have a custom code written in VBA within GreatPlains (Dynamics Version 9.0) to launch Crystal Reports which uses Crystal Viewer control. When the users click a button on Sales Screen to print an invoice, it gives a drop down with values 'Prelimanary', 'Final'. When the user picks 'Prelimanary' the report has to print to the default tray (TR...
7 6/25/2007 10:26:56 PM
Word 2003 ActiveDocument.Name
Hi group I have a macro that uses the ActiveDocument.Name property, but it seems that when I create a new document based on the template that holds this macro, the new document is not always the active document. I would assume that when you create a new document, this would automatically be set as the active document, but I can see it happens many times, that the new document it plac...
6 6/25/2007 6:29:10 PM
Styles help
I was working with Russ on this but I had a family emergency and gone for 5 days. I have the following macro but can’t get it to work right. When I run the macro for example it converts "^dLISTNUM 24 \l 2" to the word "Heading 2". It doesn't see that as an Outline Number style and make it “1.2”. Dim SearchRange As Range Set SearchRange = ActiveDocument.Range SearchRange.TextRetrie...
17 6/25/2007 5:25:58 PM
Set Active Printer using automation in word for C#
How to set the active printer in late binding for word.application using C#? Try the following, cannot work: Parameters = new Object[2]; Parameters[0] = printername; Parameters[1] = 1; String[] argNames = new String[] { "Printer", "DoNotSetAsSysDefault" }; wordApplication.GetType().InvokeMember("FilePrintSetup", BindingFlags.InvokeMethod, null, wordApplication, Param...
1 6/25/2007 3:43:00 PM
InsertAfter function question
Hi All, For the range object in VBA, there are insertafter and insertbefore function that insert text in front or behind the a particular range. My Question is, when I try to insert text behind the range using insertafter function. The inserted text carry the style and formatting from the original range. Eg. "This is a sentence" Assume the word "is" is my range and is red in color. ...
6 6/25/2007 2:50:19 PM
What's changed in vba in Word 2007?
Hi folks, According to a friend, this macro works fine in Word 2003 but causes a crash in Word 2007. The name boat-03 is the name of the current active document. Sub FollowLink() Selection.Hyperlinks(1).Follow Documents("boat-03.doc").Close End Sub I personally don't have Word 2007 to test it myself. Can anyone shed any light on this?...
2 6/25/2007 2:25:34 PM
Need troubleshooting help with 3 lines of VBA code
This crashes Word 2007 even though it works with previous versions. Current doc is just standing for the name of the currently active document. Sub FollowLink() Selection.Hyperlinks(1).Follow Documents("current.doc").Close End Sub Any one got any idea why?...
2 6/25/2007 2:24:31 PM
Evaluating a MERGEFIELD = "RET"
This is a really wierd one. I am guessing that "RET" may have some reserved meaning and it is interfering with my IF statement, but not sure. So here is what I'm trying to do. In Office 2003, I'm doing an INCLUDETEXT thing when a certain MERGEFIELD = "RET" which is something that we pull to a data .csv file from our database. I've dumbed it down for myself for testing to take out ...
14 6/25/2007 2:17:01 PM
AutoClose and file path in footer
Hi I would like to create a AutoClose macro that enters the file path in the footer of page 1. Any ideas?...
2 6/25/2007 12:47:02 PM
Save Document oddity
I have used macros similar to the following to insert (in this instance) the path at the foot of a document. However testing this in Word 2007 has thrown up an anomaly in that the check for whether the document is saved is completely ignored inevitably causing an error at the line pPathname= if the document has not already been saved. This always worked in Word 2003, however on testing agai...
4 6/25/2007 12:43:20 PM
Multiple text selection in Word
Hi everyone! I have a small problem; please help me to solve it if somebody knows. I have to find and select all occurrences of any string in Word document. I'm working with Word document by OLE. The sample code is : If (oWord_FoundRange.Find.Execute("Any string", , , , , , True)) Then oWord_FoundRange.Select End If oWord_Document.Activate But it selects only the first occurrenc...
8 6/25/2007 6:27:00 AM
mscomm not opening
Hi Everybody: I've been trying to get the Dialer software example that came with VB to work. I changed the port number to match my modem port number and I keep getting the "The device not open " error message after the "MSComm1.PortOpen = True" is executed. There is no sound that generally heard when a modem port is opened. Does anyone have a suggestion? Thanks KAB...
1 6/24/2007 9:06:04 PM
Filling a protected form
I have a protected form that I wish to fill in using VBA but I keep get the message that I am trying to type into a protected area. I can manually type text into this form so why can't I do the same in VBA When I record a macro as I type into the form I get something like Sub Macro2() ' ' Macro2 Macro ' Macro recorded 22/06/07 by Fred Schreuder ' Windows(1).Activate Selection...
3 6/24/2007 8:49:46 PM
Inserting a field that users cannot edit
I am using custom doc properties to store some values and update several fields in a word document after a particular event. I do not want users to be able to overwrite any of the fields by typing. I believe that this can be accomplished by selecting the field and pressing ctrl+shift+F11, but how can I accomplish this programatically? (These are fields as in ActiveDocument.Fields) Tha...
2 6/24/2007 6:03:00 PM
code to reactivate toolbars?
This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C7B0C4.D7038840 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, I've automated some email functions from within my MS Word documents. = But my Word toolbar functions do not function after emailing unless I = either close Outlook or shift from Word to Outlook bac...
7 6/24/2007 12:59:16 PM
Bizarre table behaviour - can you explain?
Hi, This is Word 2002... but I'd be surprised if it was unique to Word 2002... Fed up with the DocumentMap not handling tables, I wrote my own outliner that selectively shows and hides rows... worked a treat. Then I discovered I needed some extra columns - but I've no screen estate left, so I thought why not use a similar trick to show/hide one of a pair of columns (well, alternate ...
5 6/24/2007 10:15:02 AM
A content control like MS's citation, bibliography, TOC, etc.?
In Word 2007, inserting a bibliography, citation or table of contents adds content controls that have features I'd like to use too. But I don't see how. Insert a bibliography or table of contents, click in it, and you'll see commands where the title would be. Add a citation, click in it, and you'll see a drop-down list in which the entries are commands. Is there a way for us to create su...
2 6/23/2007 5:27:37 PM
Problems unprotecting template, running a macro and reprotecting
Good morning, I have a template that contains 3 macro buttons. I have the template password protected but I would still like users to be able to use the macro buttons. I keep running into two problems: 1. The macro buttons do not work at all when the template is password protected 2. If I protect the form and then save it and reopen it the macro buttons again do not work. But if I ...
2 6/23/2007 9:38:00 AM
RoutingSlip Object and ActiveDocument.HasRoutingSlip
In Word 2007 these are listed as hidden. What is the replacement for these objects and properties? What is the replacement for these or is there a way to still access these members? -- Dave B...
2 6/23/2007 9:17:48 AM
Find out which type of footer is used on the current page in a given section
Hi all, I am writing some code that places a picture in a document. This works perfect. I only have one question. I am setting the width of the picture to a fixed number. Then I want to check if the hight of this picture still fits on the current page. If it doesn't, I need to calculate the maximum possible height and change the width accordingly. I know I can use the Information(wdVe...
4 6/23/2007 9:02:54 AM
Print 2 Separate Documents Duplex
Is there a way to send to separate one page documents to a duplexing printer, and send some kind of code so the printer knows to print the second single page document on the back side of the paper? ...
2 6/23/2007 8:55:38 AM
275 Pages: <<  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  >>  

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