Group:  Microsoft Word ยป microsoft.public.word.vba.beginners

Threads Replies Last Post
33 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  
Simple Question (Switching between Windows)
I have an easy one. I have two documents open. One called "New Document" the other called "Transcript". I need a way to switch back and forth between documents using the document names and not the window numbers (windows(1)). I need to use document names because these two documents might be different numbers depending on which one I open first. I'm using a macro to copy text fro...
3 1/31/2007 1:24:00 AM
Inserting a table with Format from Excel into Word
I would like to export a table from excel into word while preserving the excel formatting. I would like the word doc to appear as if I had selected the table in excel; copied it; and pasted it into word. I understand the .Text and insert.after.text functions, but I am not sure how to preserve the table format. ...
5 1/30/2007 10:09:36 PM
Finding a table in a word doc.
I am currently tring to find a table in a word doc using execl automation. I can not find the first table. -- Thanks Jason...
4 1/30/2007 8:18:01 PM
Opening a Word Template from within Excel
I have the following VBA code with opens a Word Template (.dot extension) from Excel: 1. CommandButton1 code on worksheet -- Private Sub CommandButton1_Click() SQLRollup DeleteBlankRows RollupToSQLServer1 InsertTrackingSpecificData frmClients.Show End Sub 2. Code on frmClients Private Sub cmdProposal_Click() frmOrders.Show frmClients.Hide ...
6 1/30/2007 12:23:00 PM
Variable Values dissapears
Hi all I have made a custom Dialog in which users will enter information. This information will then be downloaded into the document via docvariables. Some of the values shall also be saved as custom properties with the document I want the dialog to have preset values if no values are present in the document i.e NOT in the document show the message "Error, No document variable supp...
1 1/29/2007 1:20:03 PM
Insert value from VBA function into document.
I have the following VBA functions which I use extensively in Access: Public Function FirstXDayOfYear(year As Integer, xday As Integer) As Date FirstXDayOfYear = DateValue("1/1/" + Str(year)) While (DatePart("w", FirstXDayOfYear) <> xday) FirstXDayOfYear = DateAdd("w", 1, FirstXDayOfYear) Wend End Function Public Function DateFromWeek(week As Integer, year As Integ...
6 1/26/2007 11:38:00 PM
How to call objects in VB3 style?
I am trying to call some Word functions from lotusscript which uses the VB3.0 syntax of passing parameters in order (instead of the paramname:=paramvalue syntax). Where can I find the correct order for the Word method calls? I'm trying to do, for example, this: Selection.InlineShapes.AddOLEObject ClassType:="Package", FileName:= _ "C:\Documents and Settings\gallagb.CAIW...
2 1/26/2007 4:19:29 PM
Convert string to date
Sorry this is so sad, but it's been awhile: I have a 6-digit string representing a date. That is, "123005" has been input. It means 12/30/05, but it's defined as a string. I want to convert it to the date value for 12/30/05 (not for 10/09/2236). How do I convert this string to its complementary date value? TIA ...
6 1/25/2007 3:24:25 PM
macro for word
Hi Everyone I need a macro that creates a drop down menu on word document and appear names inside it. Also this drop down menu must not be viewed when printing. Just names should appear when printing. Thank you ...
2 1/24/2007 3:36:55 PM
inserting two text blocks with different formats in Word from Excel
I am creating a Microsoft Excel Spreadsheet which launches a Word Doc and would like to make a document title in a certain format and below it make the body text with another format. It seems as if both texts always use the same formatting. Below is a section of my code. With mywdRange .Text = Range("F6") & " Title" & " Text" .Font.Name = "Comic Sans MS" .Font.Size = 20 ...
3 1/24/2007 12:44:20 PM
Body Text difficulty when Excel launches Outlook Message
I need to generate an email from excel which contains excel data in an outlook mail message. I cannot find a way to insert more text after the original body text (much like the insert.after.text command when launching a MS Word document). I would like to have a loop which inserts more text into the message body, but the .body command will replace all existing text. Set objOL = New Outlook....
2 1/24/2007 2:20:52 AM
Which forum will suit me best?
I have Win98 SE and Microsoft Word 2000 and I am wondering which forum will suit me best as I am a complete novice who will have some rather basic questions to ask regarding the use of Word 2000. Thanks, Dawn Davies. ...
4 1/23/2007 6:07:50 PM
Adding a shadow to an inline picture
I can manually add a shadow to an inline picture by selecting the picture and using the Drawing toolbar, but when I record that action in a macro Word writes into the code: Selection.ShapeRange(1).Shadow.Type = msoShadow6 'the shadow type I chose However, if I try to run the macro I get an error because Shadow is not a property of ShapeRange, even though that is what the record macro t...
9 1/22/2007 8:48:29 PM
Empty DocVariable Field
I have a word template that enters text if a particular option button is selected. If the other option button is selected, then no text needs to be entered. How do I set the code so that nothing is entered into the variable and I stop getting the 'Error! No document variable supplied' message on my document? I cannot put: ActiveDocument.Variables("additional").Value = ...
3 1/19/2007 4:50:58 AM
Header watermark throughout document
I am using Word 2003 and trying to create a macro that will put a copy watermark on all pages. When I record the macro by choosing Format, Background, Printed Watermark, etc and then run the macro in a document with more than one section or a different first page, it only puts the watermark in that section. How can I edit the code so it will apply to all headers? Thanks, Ricki ...
4 1/13/2007 2:09:09 AM
Variable into a hyperlink
How do you put a variable into a hyperlink address? Stock = textbox1.text Activeworkbook.FollowHyperlink Address:="http://finance.yahoo.com/q?s=IBM What I want is not IBM, but Stock Thank you Gordon ...
3 1/12/2007 6:57:46 PM
Document Text to/from XML
Probably a really simple question, but I want to manipulate some text in a word document using the XMLNode object. How do I populate the XMLNode with the text? Note: the text is regular Word content that just happens to be XML. More specifically, the file I'm using is documentation for web services. The file is a regular Word document. It has lots of text, figures, etc. and (since the su...
3 1/12/2007 12:23:00 AM
font color line based on character search
I write a little VBA for excel and sometimes I want to print out the code and have comment lines print in their green color. However printing from VBA results in no color :(. I paste into word and print from there but the font color doesnt transfer. I was trying to write code that looks for the ' selects the rest of the line and changes the color, cycling through the entire document. Im havi...
3 1/10/2007 6:54:06 PM
Email macro in a template
I have created a template that contains a macro that will save the document and then email it to 3 people. This all works fine from my xp prof system running office 2003. However, from a win 98se system running office 97, it sends an email with no attachment. This is all brand new to me and I've been learning as I go and have no idea what is wrong. Can anyone help me? Here is the code: ...
3 1/10/2007 4:02:13 PM
save word documents in a folder as pdf
I was hoping that somebody out there could help me? I have a limited knowledge of excel VBA and I'm attempting to write a macro in word, which will read all of the files within a directory and save them to an array and then convert all of the word documents in a pdf format. I've tried to do this by recording a macro but I haven't had any luck. I'm working with Word 2003 and Adobe acroba...
11 1/10/2007 11:00:19 AM
Docproperty from userform and vanishing custom toolbar
Hello, I would like some advice on two matters: 1.- I've created a toolbar and saved it in normal.dot. Several people has copied the template to their PCs and everything goes OK for everybody except one person, whose toolbar keeps not exactly disappearing, but emptying. Each time she turns the computer on, the bar has no buttons. What's happening? 2.- I don't know exactly how to assign...
2 1/8/2007 9:49:01 AM
Create Search and Replace with the Replacement text from an Inputbox
I need to create a macro to search for all ^t with format style TOC 1 and replace with ^t and text from a user inputbox. HELP! ...
3 1/7/2007 7:56:09 PM
Run a Mail Merge to Output Multiple Text Files?
MS Word will happily let me mail merge to create a single large file. But I want a bunch of little files! How might I run a mail merge or macro that would create a seperate text file (.txt) for each letter? I certainly appreciate your insight! ...
2 1/6/2007 6:26:03 AM
Macro to create X number of items based on user input
I've created a simple Word template to track meeting/conference call action items. However, one user might have just 3 items to enter while another has 15, etc., so I have a macro (add_item) that will paste the brief table (including fields) for an additional item. I'd like the user to be prompted at the beginning with an Input Box to enter how many items they will be entering. The add_it...
3 1/4/2007 8:55:49 PM
Show Negative number as Positive
I know this one is really easy, but I can't seem to find it. I have a negative number assigned to a variable and I need to take that number and assign it to a second variable except I need the postive value of that number to be assigned to the second variable. variable1 = -10 variable2 = Positive(variable1) I'm sure there is some sort of format expression similar to the above tha...
3 1/4/2007 12:38:00 AM
33 Pages: 1  2  3  4  5  6  7  8  9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  >>  

Home | Search | Terms | Imprint
Newsgroups Reader