473,324 Members | 2,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

macro button by code

I'm trying to make a macro button by code for ms-word2007 & ms-word2003 from one template. When the button is press it starts a userform.


I got something like this in minde:


Private Sub Document_New()


If active.document = word2003

Add menu button

Bla bla

Els if active.document =word2007

Add Iribbon button

Bla bla

End Sub


Is this possible and If yes can somebody give me a head start?


Thnx!!!
Oct 15 '08 #1
0 817

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Colin Steadman | last post by:
Apoligies if this post appears twice, but my first attempt at posting it was hours ago and there is still no sign of it in the forum (says five minutes in the confirmation message). ...
1
by: meganrobertson22 | last post by:
Hi Everyone- I am trying to use a simple macro to set the value of a combo box on a form, and I can't get it to work. I have a macro with 2 actions: OpenForm and SetValue. I can open my form,...
1
by: Jo K. | last post by:
I have the following fields in a table. -JobNo (primary key) -Assessor (combo box containing only two names to choose from ie. John, Bill) I have created two seperate reports which have exactly...
5
by: Bill | last post by:
This database has no forms. I am viewing an Access table in datasheet view. I'd like to execute a macro to execute a function (using "runcode"). In the function, I'll reading data from the record...
2
by: Senthil | last post by:
Hi All I need to create an Excel report and create a command button and have to run a macro on the click event that will print all the pages in the Excel workbook. I am able to create the report...
3
by: swb76 | last post by:
Hi, I have 6 queries in Access that run great. They need to be run in sequence with the first 5 queries writing to tables and the sixth one pops up the final results in datasheet view. Now, how...
5
by: halooti | last post by:
Hello all I created a button with excel and assigned a macro to it which I recorded with excel Macro Record.. The button sorts column C ascending, this is the code Sub Macro1() ...
3
by: JFKJr | last post by:
Hello everyone, the following is the code which opens an excel file and creates a toolbar button. And, when I click the toolbar button as shown at line #28, the code should call the "Example"...
2
by: loneranger | last post by:
Hi Everyone Visual Studio 2005 VB 2005 Windows Application I have a form with one combo box and a button I want the user to make a selection from the combo box, click the button and have...
1
MitchR
by: MitchR | last post by:
Good Morning Folks; I have a question that is pretty far fetched but here goes nothing... I am looking to find a way to insert a macro into an Excel command button located in an Access VBA...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.