Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-29-2014, 10:30 AM
gmaxey gmaxey is offline Macro to add periods into MAC address lists Windows 7 32bit Macro to add periods into MAC address lists Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Provided each cell has 12 characters, this (while crude) should work:



Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Word.Table
Dim oCell As Cell
Set oTbl = Selection.Tables(1)
  For Each oCell In oTbl.Range.Cells
    If Len(oCell.Range.Text) = 14 Then
      oCell.Range.Characters(5).InsertBefore "."
      oCell.Range.Characters(10).InsertBefore "."
    End If
  Next
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shared file\macro & IP address ibrahimaa Excel Programming 0 01-29-2012 09:08 AM
Auto Forward Emails - Specific Time Periods Only Dav Outlook 0 06-22-2011 12:03 PM
Macro to replace From Address in Outlook RlcZek113524 Outlook 0 06-08-2011 02:20 PM
HELP! Outlook 2003 Address Books - multiple account address lists ukmonkeynuts Outlook 0 06-01-2011 06:18 AM
Putting periods/dots around the letter A ph3iron Word 0 03-27-2010 06:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:56 PM.


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