assing macro to an an image, shape, text in Word 2007

I would like to run one of my macros when either an image, or a shape, or a 
text is clicked in Word 2007 document.
Thanks,

0
Utf
4/9/2010 4:45:01 PM
word.vba.general 1023 articles. 1 followers. Follow

2 Replies
4889 Views

Similar Articles

[PageSpeed] 50

Use an ActiveX control, as they have a _Click event.

Lev wrote:
>I would like to run one of my macros when either an image, or a shape, or a 
>text is clicked in Word 2007 document.
>Thanks,

-- 
Gerry

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/201004/1

0
Fumei2
4/9/2010 5:10:46 PM
Another method is to insert a MacroButton field and paste the image into the 
field code where the display text would be. See 
http://www.word.mvps.org/FAQs/TblsFldsFms/UsingMacroButton.htm, and the 
"Double-click or single-click" section of 
http://www.word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm.

-- 
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so 
all may benefit.

Fumei2 via OfficeKB.com wrote:
> Use an ActiveX control, as they have a _Click event.
>
> Lev wrote:
>> I would like to run one of my macros when either an image, or a
>> shape, or a text is clicked in Word 2007 document.
>> Thanks, 


0
Jay
4/9/2010 5:48:07 PM
Reply:

Similar Artilces:

Deal with text characters that are greater than chr(127)
I am dealing with a spreadsheet that is downloaded from another application. The parent application allows html text and includes some bullits. When this text is downlaoded to an excel spreadhseet the bullits are converted to the followng text string: • The � is chr(128) and the � is chr(162) (I may have these reversed?) but I have not been able to determine the code for the �. But indepedent of not knowing the code for the one character I'm having trouble dealing with these characters. Using a manual search for just one character nothing is found. I'd like to replace...

How to set publisher 2007 as default program...
I have publisher 2007 and 2003 installed on my computer (my company wants to keep the old version in case the new version doesnt work out). Everytime I open one of my Publisher (.pub) files, it opens in Publisher 2003. My question is, how do I set all my .pub files to open in Publisher 2007 not 2003. I have searched high and low and cannot find an answer. I have already attempted set the program default, but it does nothing. (I Right-clicked, properties, Change Default program... Publisher 2007 is not listed. I browsed for the .exe file for Publisher 2007 (which has the same name as th...

Excel 2003
Hi all Excel Gurus, I need help. I have an excel workbook with a sheet called template and i want to create a button to copy a selection of data which is B9:B34 and i need it to paste the information to another excel workbook with a sheet called data which will be A:AA and add each row when pressed. When the data has been copied over i need it to close the data sheet. Can someone help me please? When you copy a range of cells you only have to specify in the destination l;ocation the 1st cell of the range like I did below. Private Sub CommandButton1_Click() FName ...

MS Outlook 2007 SP2
Is MS OutlooK 2007 SP2 support for CRM4.0 Outlook client. In documentation it is mentioned MS Office System SP1. Please clarify if MS Office 2007 SP2 is supported. The documentation was prepared before SP2 was available, but what they describe are the minimum version and patch levels. Generally speaking, any patch level above the documented minimum will be fine. Dave Ireland "mvj123" <mvj123@discussions.microsoft.com> wrote in message news:A16700EA-5ACA-41CA-997A-9BF997E73D37@microsoft.com... > Is MS OutlooK 2007 SP2 support for CRM4.0 Outlook client. In documentatio...

Image attachments problem
I am trying to set up outlook 2002 (XP). When we receive a message from someone with image attachments (jpg, gif) we are unable to view them in the message. How do I make it so we are able to view image the images in the actual message. I have tried everything, well almost everything. Can someone help? Thanks Auto ...

Mouse pointer changes to hourglass shape
I've just put up the trial version of visio. Very frequently, when stuffing around trying to get a connection line organized the way I want it, the mouse pointer changes to an hourglass shape. I can continue to use it (treating the middle of the hourglass as the tip of the pointer) but it's very irritating. I can clear it back to the standard arrowhead pointer by right-clicking, but that brings up the context menu, which I then have to dismiss. Very irritating. My system is a fully-updated Windows 2000 Professional. Graphics card is a Matrox G550 with the latest driver. Any ...

Type hidden text and/or numbers; return asterisks
I want to type a name or series of numbers or a combination in a cell without anyone that may be standing around seeing what I am typing in and have it return asterisks (or another character). This would be like entering a password for an application and instead of the characters you are typing, you would see asterisks for example. The data being typed into the cell might be used in a formula elsewhere in the worksheet. I've hidden the formula bar so that you can't see what's being typed in there. And, I tried adding a custom format to the cell that returned single quotes acros...

Macro for checkbox
I have compiled this makro. But the error message is:Compile error invalid or unqualified reference and CheckBoxes is highlighted. Please help. If .CheckBoxes(46).Checked = True Then Range("O54").Select ActiveCell.FormulaR1C1 = "50000" Range("T54").Select ActiveCell.FormulaR1C1 = "4000" Range("Y54").Select ActiveCell.FormulaR1C1 = "4000" Range("AD54").Select ActiveCell.FormulaR1C1 = "4000" Range("AI54").Select ActiveCell.FormulaR1C1 = "4000" Range(&...

as400<iSeries db<ntWS<macro<excel tools
i have an inventory of appx 1000 serial numbers. using keystroke recording, i can populate 2 - 6 fields on 4 green screens to complete a process on one serial number. is there a way to tweak my macro to incrementally continue, automatically, from a list stored in an excel workbook on the client? would be very grateful for fresh ideas. Show us your macro and some data details. -- HTH RP (remove nothere from the email address if mailing direct) "ayeFayze" <ayeFayze@discussions.microsoft.com> wrote in message news:7688E31B-F5AD-491F-A9E8-9B03AA0168D6@microsoft.com... ...

Excel crashes while opening excel file imbeddied with macros
Help! This is the similar problem as mentioned by Delbert on 12/12/2005 that whenever they open a particular Excel file, it gives them a "Send Report Error." Weird thing about it is it doesnt happen in all other Excel files, only happens to this file when saving as usual and trying to reopen it shortly after that. It happens on my machine and my friend working on the same file also. Details: OS: Winxp Office 2003 SP2 Files are saved in local drive Files are around 12MB size (varies) Files have Macros imbedded Files have links While opening, the dialogue box appears twice, asking...

Problem executing a macro from different workbook where it is
Hi everibody, I have a macro in a workbook called, for example, WB1.xls. The macro takes differentes ranges and copy them in another location. ex. : Public Sub ZeroizaModeloSteve() Set wbModelo = Application.Workbooks(Mid(cteLibModelo, 2)) Set wsI = wbModelo.Sheets("I") Set wsT = wbModelo.Sheets("T") Set wsmodelo = wbModelo.Sheets(cteHojaModelo) Set wsZeroing = wbModelo.Sheets(cteHojaZeoring) wsI.Range("F50:IS50").Copy wsI.Range("F51").PasteSpecial xlPasteValues end sub 'i have omitted declaration variables and desct...

Copied text from Notepad disappears when pasted to Outlook XP
This seems to be a recurring but intermittent problem. ...

write Avi/wmv file using bmp images
How to write Avi/wmv file using bmp images I would think you'd want some sort of authoring package. Do you just want to show them one after another? If so you may be able to use something like: http://whorld.org/temp/BmpToAvi.html But, if you want to do anything fancy you'll want something like Premiere so you can lay out the timeline. Tom "Unknown" <gaurav.samsung@gmail.com> wrote in message news:8ae3fde3-a48d-4dfd-8bc4-2b609a14fc46@u10g2000prn.googlegroups.com... > How to write Avi/wmv file using bmp images ...

Student Loans in Money 2007
Hi, I have four student loans all under one account with Sallie Mae. I've entered them in Money separately because they are at differing interest amounts - I make only one payment to Sallie Mae and they split it between the loans. My problem is that I dont know how to apply the one payment to the four accounts (in order to track). You can't have one Loan Payment target four different Loan Accounts. It's just a limitation. Not a great one. If I were designing it, it wouldn't have this limitation, but there it is. Assuming you want to track these as separate loans (and ...

Project 2007
One of my students has some tasks which will be repeated at different points during the project (Reoccurring task won't work in this case). Is there a way to copy and paste his extensive note information without having to open the Task Information window each time? Selecting the task row to copy and paste won't bring over the notes. In article <8FB23A12-C779-4370-9749-D9758403B352@microsoft.com>, Mikel Anne <MikelAnne@discussions.microsoft.com> wrote: > One of my students has some tasks which will be repeated at different points > during the project (...

Excel 2007 & XP/Vista
I hope this is the right newsgroup for this posting, my apologies if not. If I open a workbook in Vista (which also loads Common Macros.xlsm via XLSTART) and then open another workbook this also opens the same instance of Excel. However, if I then try open a workbook in an email attachment another instance of Excel loads and I get the message "File in Use - Common Macros.xlsm is locked for editing" and I am given the option to Open Read Only, Notify or cancel. In my XP installation everything opens within the one instance of Excel without any problems. Is there anything tha...

Syntax to add image to invoice
I would like to add a logo image that is different from my company logo to my invoices. I have certain products that are certified by various organizations and I want to put the logos of those certifying organizations on the bottom of my invoice. I have put the logos in my \store operations\pictures directory, but I cannot figure out the XML syntax that I need to use in order to make the images show up on the invoice. Any suggestions? Thanks, Paul I suggest you to use Receipt printer from STAR TSP100 series, It has futurePRNT software that allow you to add image to the bottom of your ...

Excel 2007
So here's my issue: Excel 2007 user opens more than one spreadsheet, however, when (in Excel) you attempt to use the Switch Windows toolbar button, it only lists ONE sheet open. Opening subsequent spreadsheets results in an individual instance of Excel for each worksheet (and for each one, if you try and switch windows, you only see the one sheet open in that particular workbook). How can I get it to behave properly, so that I have one instance of Excel open.....and multiple spreadsheets that I can switch to within the single instance of the application. Can't understand wha...

Macro #9
Each Month I receive a CD with an excel spreadsheet( call it Input Spreadsheet). Each row contains certain fields that I need to use to build a spreadsheet( call it Load Spreadsheet) that I will use to import/export into Access. However, there is a different number of rows each month. For example one month may have 500 records/rows and the next month may have 600 records/rows. When I create a Macro I turn on the recorder and make the moves of columns from input spreadsheet to load spreadsheet. However the next month may have more or less records/rows and the macro does not work. It moves the i...

Quick Categories in Outlook 2007
Does anyone know how to get rid of Quick Categories for Outlook 2007 Tasks, but still keep the category name listed? I find the color-coded boxes annoying to look at, and god help you if you accidentally click on one, it deletes your category setting for that task. I liked the old way of creating new tasks by click on the task category, typing in the category name, hitting TAB and typing the Subject. Now you have to double-click the category to get a new Task form, type in the name, then select what color coded category you want, then hit save. Don't Microsoft programmers have an...

In Excel, how do I get rid of duplicate records? Based on text r.
I work with long lists of people's names and addresses for marketing. I would like to find a shortcut to get rid of duplicate names and addresses instead of manually looking at each record. I looked at Functions and found Exact but that just identifies duplicate records and I find the functions to be complicated if not shown how to create the proper syntax. Thanks. You might like to have a look at Chip Pearson's web page on working with duplicates - http://www.cpearson.com/excel/duplicat.htm Hope this helps cheers JulieD "White T-Bird Kitten" <White T-Bird Kitte...

Autofit/Text Wrap
I have two sentences typed in a cell which has been formatted to autofit row height, and wrap text, and yet the cell will not adjust to two rows of typing, a total of 32 words, or a total of 146 characters including spaces. I don't think that's too much to type in a cell in Excel. Any ideas? One can only guess what the problem is. But I suspect the spreadsheet might be protected. >-----Original Message----- >I have two sentences typed in a cell which has been >formatted to autofit row height, and wrap text, and yet >the cell will not adjust to two rows of typing...

Counting text in a column
I used to think I was good at Excel until this stumped me. I have a column with a variety of text in each cell. Example: A1 bob bob ted ted ted charley charley charley charley, etc. Is there a formula or way I can take the whole column of data and hav it come back with something similar to: bob = 2 ted=3 charley=4 etc. for all the variables in the column? Please help, I am dying over here -- prom4 ----------------------------------------------------------------------- prom4x's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2901 View this thread: http://www...

TEXT Function: please help
I have a sheet that keeps track of MAC to IP adresses. I've created a formula that will output the required format for DHCP server import. The formula was quite long and it was suggested to use the TEXT function . Thanks to Bob Phillips and my friend LavaDude my rather legthy formula has been reduced to the folowing, but it doesnt work correctly. =IF(D2="","","host"&L2&IF(C2="","",".")&IF(OR(B2="",B2>30,),"",B2&"-")&C2&"{ hardware ethernet "&TEXT(D2,"...

Sorting by Text field of numbers
I am using Access 2003. I have created a database to help me files by "Lot#'s". Our lot numbers for one of our products is all over the place so I created the Lot # field as a text field. Ex: 02-01-01, 10000272925, 10-06-02-04-06 and 1503011 A1-02. Why does access put - 1000272925 before 10-06-02-03-05? Does this look right to anyone? My thinking is that "10" comes before "1000272925". What affect does the "-" have in sorting the numbers. Would I be better off to put a space instead of the "-"? Can anyone help me ...