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

Threads Replies Last Post
275 Pages: <<  16  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  >>  
Word document in WebControl
Hi! I'm opening Word document in standard VB6 WebControl. After execution of PrintOut method of Word document object I'm trying to open another Word document. But the WebControl asks me to save changes to the document. The question is: how can I prevent WebControl from displaying these messages. The silent property does not effect. Thanks! Igor. ...
1 6/27/2007 2:38:00 PM
Identify Active Formfield Item Number?
I am creating a locked Word 2003 document containing a number of (un-bookmarked) Text Form Fields. Owing to a problem with the limited availability of number formats for the Text Form Field (see previous Discussion Group question), I need to run a Macro on exiting the field to reformat the Result. The Macro will something like the following: Sub FieldFormatter() With Active...
5 6/27/2007 1:37:31 PM
Get data into MS Word with Stored procedrues?
Hi, I need to find out how to get data from stored procedures in a Sql server. I need to update it on Document_Open event by vba code. Does anybody have a suggestion or code examples? Kind reagrds Tskogstrom ...
1 6/27/2007 11:29:51 AM
how do i create a bilingual table of contents
I am trying to create a table of contents in both english and french but when i update the english one the french one updaes in english also...
2 6/27/2007 11:18:31 AM
Saving .doc as .html with vba
Hi all, I need to convert some .doc files to .html with vba. I tried to record a macro that did this but to save the file it has a static name eg. "filename.doc" becomes "filename.html". And that is also recorded in the macro. Is there anyone who can help me make it so that the file name of the saved file is the name of the current document? Thanks asger...
2 6/27/2007 10:53:15 AM
Accessing embedded Excel Docs
Hi I've been hunting for a solution for this for a while and was wondering if anyone could help. I need to write a script or macro which will open a MS Word (2003) doc then from with in that doc open an embedded excel spreadsheet. Unfortunately there are a number of spreadsheets in the doc and I don't know how to reference the different ones. Any suggestions would be gratefully apprecia...
1 6/27/2007 10:44:42 AM
[C#/Interop] Setting focus on page just above footer
Hallo, I'm fumbling around with C#, Interop and Word. I'm wondering how I could set focus on the page so that the cursor is on the line just above the footer, or the last line on the MainDocument?...
3 6/27/2007 10:31:59 AM
Deleting current footer and replacing
Hello, I've recently dug into Word interop using c#. The first thing I would like to see accomplished is to change the current footers of a huge pile of .dots. I've now succeeded in opening the Word Application and a Document in the background and setting the focus on the footer of the document. using: WordDocument = WordApplication.Documents.Add(ref TemplatePath, ref Missing, ref Mis...
3 6/27/2007 6:58:00 AM
Saving document with new name via vba
Hi, Following is the scenario: I have a document named: CCPC_01.doc The user opens up the document makes the changes. I want a macro which would save the updated version of this document (doesnt matter if its in the same folder) with the following name: CCPC_01_locked.doc All Help is Appreciated ...
3 6/27/2007 3:57:14 AM
PageNum and NumPages
I am building complex documents that need Page X of Y in the footer, and this is happening all in VBA. I am combining documents in code, and cannot have the pagenum and numpages fields linked when the document is completed, because it is combined with other documents. So I will get a final document and need to write my own page numbers in the footer. Every page will be in its own secti...
4 6/27/2007 12:53:03 AM
Using vba Find/Replace Bullets
Hi All I am using Word 2000, hope someone can assist, I know alot about Excel vba but am To maintain the formatting of a document, I am requiring the users to paste sometimes large amounts of text into a userform that pastes it as unformatted text into the relevant bookmark in the doument. One problem I have is that where a portion of the text was bullet points it becomes ·(followed by ...
2 6/27/2007 12:43:47 AM
Automate bookmark naming of formfields
I have a macro that adds a row (with formfields) to a 3 column table. Is there a way I can take care of the naming convention for the formfields? Eg. When the macro is used the first time....the first row is inserted with 3 formfields - Column1 formfield would have a bookmark name: text1 Column2 formfield would have a bookmark name: text2 Column3 formfield would have a bookmark name:...
4 6/26/2007 9:00:58 PM
Change the template for an existing document
I need to change the template for a number of existing documents. Can anyone tell me how to programmatically change the document template from normal.dot to newtemplate.dot and then save the document (i.e., overwrite the original file)? I have tried unsuccessfully to do this manually. Thanks in advance, Raul...
5 6/26/2007 9:00:02 PM
Insert picture in a speicific location within a document
I'm trying to insert a picture in a speicific location within a word document from a vb.net application. It was not that difficult simply to insert a picture on the current cusor position but I don't know how to insert a bmp (or jpg) image on the botton of last page only. I couldn't insert a picture in a speicific location which I want. If you have any idea, Please help this novice. I am...
4 6/26/2007 8:24:24 PM
Include several nonbreaking spaces in an expression
Dear Experts: I came up with the following macro to insert a nonbreaking space between the §-symbol followed by any number of blank spaces (usually one or two) and any following number. For example: §nonbreakingspace138 (§ 138). It is running fine. See the code below. Sub InsertNonBreakingSpace() Dim rngStory As Range For Each rngStory In ActiveDocument.StoryRanges With rng...
2 6/26/2007 8:05:55 PM
Check Box Form Field Value in If Then Else Calculation
I would like to use the Checked/Unchecked value of a Check Box Form Field in a Word protected form in a calculated field without having to use a macro, but I can't figure out what to use as the value for the conditional statement. Using Word 2003. {IF {Check1} = (What do I put here) "Value if True" "Value if False"} -- Jan Pahls...
3 6/26/2007 7:49:01 PM
renaming a module?
How do I rename a module inside the Modules folder in my TemplateProject? If I right-click on my module name inside the Project Explorer, there's no rename option. Thanks....
2 6/26/2007 7:25:19 PM
this key is already associated with an element of this collection
A macro I'm creating (see partial code below) reads tab-delimited fields from a text file. The strange thing is that after I shut it down then start it up again for testing, I receive the message "This key is already associated with an element of this collection"--almost as if the process is kept in memory from the previous session. The hangup occurs on the line that reads "arrHeaderName...
2 6/26/2007 5:37:07 PM
Mail merge and AutoNew
Hi I have a template that merges data from an Excel document and I need to create a AutoNew macro in it. I have created the AutoNew macro and it works fine if I open up the document and run it through Visual Basic. If I open up the template to create a new document it asks me to accept the SQL command that gets the information from Excel and then it seems like it forgets to run the Au...
7 6/26/2007 5:30:00 PM
Need Macro to Lock all Links
I need a macro which will lock all links in the document on screen. For Word 2003. There are two ways we can do this manually: 1. Select the entire document and press Ctrl+F11 2. Edit-Links-(Select all links in document), click Locked under "update method for selected link") But I need a macro to do this since the users who need to take these actions may find the process confusing...
3 6/26/2007 4:32:01 PM
Drawing a line
Well, I've gotten close. I'm trying to draw a line a specific distance to the left of the beginning of the current paragraph. The code below works in my test document, but in the actual working document, all it does is move the selection to the beginning of the line of text--it never draws the graphic line. Sub test() Dim xLoc As Integer Dim yLoc As Integer Selection.Move...
8 6/26/2007 4:27:51 PM
VBA file/save
I have a .dot that I'd like nun a macro to rename <file name>.dot to <file name_><textbox41>.doc & set the directory to H:\my Documents and have it appear in the und user's file/save dialog box. I'm a novice, so please be verbose. Thanks John...
3 6/26/2007 1:59:01 PM
Macro help (open doc from template - then close template)
Hi all, Can anyone help please. I have the following macro which runs based on a selection of 'Y' or 'N' in an excel spreadsheet which opens a word doc from a word template. My question is how can this be modified to open the word doc based on the template, but close the actual template once the new doc is openend. Currently when you save the new document, it also asks if you wish to ...
2 6/26/2007 1:42:00 PM
r?
Hi Everybody: I’ve run across this error on several computers and much has been written about it on the web but no one seems to understand what causes it or how to fix it. The problem became evident when I was trying to use the “Dialer” sample code in Visual Basic. ALL the ports came back with a “Run-time error 8012 device not open” even when the statement before it is: “M...
1 6/26/2007 1:38:01 PM
Reading a .txt file
Hey guys, I have a ms word document that contains a table. I'm looking for a script that will read variables from a .txt file (output from another program) and insert them into my word document (report) I cannot seem to find anything on the web. Thanks ...
6 6/26/2007 9:36:05 AM
275 Pages: <<  16  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  >>  

Home | Search | Terms | Imprint
Newsgroups Reader