If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
template macro
Hi
I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
#2
|
|||
|
|||
template macro
This is called a UserForm. it is created in the VBE window (ALT+F11). You
create the UserForm with various textboxes on it, create a command button that sends the textbox info and places them in bookmarked locations on your document, save this in a template, create a AutoNew macro that runs the userform. The following page explains how to create a Userform: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm I would be more than happy to send you a simple example that you can look at the code and modify as necessary. Let me know! -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "rexmann" wrote in message ... Hi I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
#3
|
|||
|
|||
template macro
Hi Bill
The link seems to have what I need - much appreciated Cheers Rexmann "Bill Foley" wrote: This is called a UserForm. it is created in the VBE window (ALT+F11). You create the UserForm with various textboxes on it, create a command button that sends the textbox info and places them in bookmarked locations on your document, save this in a template, create a AutoNew macro that runs the userform. The following page explains how to create a Userform: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm I would be more than happy to send you a simple example that you can look at the code and modify as necessary. Let me know! -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "rexmann" wrote in message ... Hi I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
#4
|
|||
|
|||
I used this guide to try to create a userform to enter specific text into a
bookmark in the footer. I followed the instructions using only one textbox as I only wanted one insertion and I got an error that appears to be linked to the .Range_ part of the macro code. I have pasted my code below so you can see what I did. The help menu seems to be suggesting that I need to add somehting after the "Range" command, but I don't know what. can you help? Thanks. Private Sub CommandButton1_Click() With ActiveDocument ..Bookmarks("Text1").Range ..InsertBefore TextBox1 End With UserForm1.Hide End Sub And the "autonew" macro to trigger it Sub autonew() ' ' autonew Macro ' Macro created 16/09/04 by Fiona Nelson ' UserForm1.Show End Sub As stated, this is taken directly from the document you link to... "Bill Foley" wrote: This is called a UserForm. it is created in the VBE window (ALT+F11). You create the UserForm with various textboxes on it, create a command button that sends the textbox info and places them in bookmarked locations on your document, save this in a template, create a AutoNew macro that runs the userform. The following page explains how to create a Userform: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm I would be more than happy to send you a simple example that you can look at the code and modify as necessary. Let me know! -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "rexmann" wrote in message ... Hi I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
#5
|
|||
|
|||
..Bookmarks("Text1").Range
..InsertBefore TextBox1 should be all one line of code ..Bookmarks("Text1").Range.InsertBefore TextBox1 -- Please respond to the Newsgroup for the benefit of others who may be interested. Questions sent directly to me will only be answered on a paid consulting basis. Hope this helps, Doug Robbins - Word MVP "fiona" wrote in message ... I used this guide to try to create a userform to enter specific text into a bookmark in the footer. I followed the instructions using only one textbox as I only wanted one insertion and I got an error that appears to be linked to the .Range_ part of the macro code. I have pasted my code below so you can see what I did. The help menu seems to be suggesting that I need to add somehting after the "Range" command, but I don't know what. can you help? Thanks. Private Sub CommandButton1_Click() With ActiveDocument .Bookmarks("Text1").Range .InsertBefore TextBox1 End With UserForm1.Hide End Sub And the "autonew" macro to trigger it Sub autonew() ' ' autonew Macro ' Macro created 16/09/04 by Fiona Nelson ' UserForm1.Show End Sub As stated, this is taken directly from the document you link to... "Bill Foley" wrote: This is called a UserForm. it is created in the VBE window (ALT+F11). You create the UserForm with various textboxes on it, create a command button that sends the textbox info and places them in bookmarked locations on your document, save this in a template, create a AutoNew macro that runs the userform. The following page explains how to create a Userform: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm I would be more than happy to send you a simple example that you can look at the code and modify as necessary. Let me know! -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "rexmann" wrote in message ... Hi I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
#6
|
|||
|
|||
Thanks Doug,
I changed the code at one point to have an underscore after .Range I thought that was supposed to link the lines (i.e. make the line act as one full line, rather than a break), however it did not appear to work. The solution you provided (just make it all one line) did work. thanks, Fiona "Doug Robbins" wrote: ..Bookmarks("Text1").Range ..InsertBefore TextBox1 should be all one line of code ..Bookmarks("Text1").Range.InsertBefore TextBox1 -- Please respond to the Newsgroup for the benefit of others who may be interested. Questions sent directly to me will only be answered on a paid consulting basis. Hope this helps, Doug Robbins - Word MVP "fiona" wrote in message ... I used this guide to try to create a userform to enter specific text into a bookmark in the footer. I followed the instructions using only one textbox as I only wanted one insertion and I got an error that appears to be linked to the .Range_ part of the macro code. I have pasted my code below so you can see what I did. The help menu seems to be suggesting that I need to add somehting after the "Range" command, but I don't know what. can you help? Thanks. Private Sub CommandButton1_Click() With ActiveDocument .Bookmarks("Text1").Range .InsertBefore TextBox1 End With UserForm1.Hide End Sub And the "autonew" macro to trigger it Sub autonew() ' ' autonew Macro ' Macro created 16/09/04 by Fiona Nelson ' UserForm1.Show End Sub As stated, this is taken directly from the document you link to... "Bill Foley" wrote: This is called a UserForm. it is created in the VBE window (ALT+F11). You create the UserForm with various textboxes on it, create a command button that sends the textbox info and places them in bookmarked locations on your document, save this in a template, create a AutoNew macro that runs the userform. The following page explains how to create a Userform: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm I would be more than happy to send you a simple example that you can look at the code and modify as necessary. Let me know! -- Bill Foley, Microsoft MVP (PowerPoint) Microsoft Office Specialist Master Instructor - XP www.pttinc.com Check out PPT FAQs at: http://www.rdpslides.com/pptfaq/ Check out Word FAQs at: http://word.mvps.org/FAQs/General/index.htm "rexmann" wrote in message ... Hi I have recently opened a template in office which on opening has a pop up box where the user types in the details and then clicks ok and the details appear in the text boxes on the screen. I know how to create forms, templates and simplish macros. I was just curious how this is done. Does anyone know of a tutorial? It is not essential for my work I am just interested in how. Any help would be appreciated. Kind regards Rexmann |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calling macro in global template | Bo Rasmussen | New Users | 1 | June 21st, 2004 05:30 PM |
Attaching Graphic to a template to use in a Macro | Rosegirl | General Discussion | 2 | June 16th, 2004 02:10 PM |
word error | mac | General Discussions | 1 | May 6th, 2004 08:14 AM |
How do I make a macro global... i.e. what is the global template for excel | deb | Worksheet Functions | 1 | October 16th, 2003 10:11 PM |