Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-31-2016, 09:42 AM
c1905 c1905 is offline Editing styles with macros/VBA: a simple question Windows 7 64bit Editing styles with macros/VBA: a simple question Office 2010 32bit
Novice
Editing styles with macros/VBA: a simple question
 
Join Date: Aug 2016
Posts: 3
c1905 is on a distinguished road
Default Editing styles with macros/VBA: a simple question


Greetings,

I'm using Office Professional Plus 2010 on Win 7 64 bit. I'm trying to create a style that (among other things) automatically wraps parentheses around text once the style is applied. I found no simple way to do it, but someone somewhere suggested using the following code:

Code:
Sub AddParens()
    Selection.InsertBefore "("
    Selection.InsertAfter ")"
End Sub
I understand that this is some sort of macro or VBA, but I cannot figure out how to modify my style (let's call it "paren") using that code. I've made many searches and all I could found was many examples of codes without any explanation of where exactly they are to be added. I have the developer ribbon visible and I played around with the "macros" and "visual basic" tabs, but could find nothing there to help me.

Your help is appreciated.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple math question markg2 Excel 6 03-01-2014 11:10 AM
Editing styles with macros/VBA: a simple question Simple Mail Merge Question Ethanflux Mail Merge 1 09-29-2013 07:21 PM
Editing styles with macros/VBA: a simple question Simple question about line space danezcou3 Word 1 04-21-2013 05:38 AM
Editing styles with macros/VBA: a simple question Simple Question, difficult task... Jshopping Word 4 01-19-2011 03:04 PM
Simple Envelope Question.... cmcneill Word 0 08-17-2009 05:12 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft