Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 17th, 2014, 08:33 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2014
Location: NC
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to AlisonCan
Default Convert list numbers to static text

I have to create numbered requirement entries throughout a large document. Initially I increment by 10 so later on if I have to add entries to a section, I can make them sequential but not really necessary. There could be 2000-300 numbered entries in the document but when I'm finished, the numbers must stay static, They can not be allowed to change through insertion of new numbers or deletion of existing ones. In a way this is similar to using the copy/drag functionality in excel to create a series of numbers from a formula "= a1+10" and then copying/paste special/values so the results are present and not the formula.
An example is:

VR1 Requirement 1
VR10 Requirement 2
VR20 Requirement 3


Does anyone know if this would be possible in Word 2010, either through existing functionality or through backend VB coding? If so could you point in in the right direction?
Thanks!
Reply With Quote
  #2 (permalink)  
Old November 4th, 2014, 12:51 AM
Friend of Wrox
Points: 3,060, Level: 23
Points: 3,060, Level: 23 Points: 3,060, Level: 23 Points: 3,060, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: , , .
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi Alison

A small hint through Word VBA

Code:
For i = 1 To 100
        Selection.TypeText Text:="VR1 Requirement " & i
        Selection.TypeParagraph
    Next i
Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Reply With Quote
  #3 (permalink)  
Old November 4th, 2014, 09:40 AM
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the tip. I think that will work.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Text(Sql Server Text Field) to Image(JPG) srinivas72 ADO.NET 2 February 13th, 2009 05:31 PM
loop through static list of values? mister_mister XSLT 6 January 4th, 2008 10:48 AM
Convert Numbers to Words hasankelepir Classic ASP Basics 5 October 1st, 2007 07:15 AM
how to add static text in drop down list vinodonline2000 ASP.NET 2.0 Basics 10 August 16th, 2007 12:39 AM
How can i convert english numbers to arabic number zahidpervaiz Classic ASP Databases 0 December 30th, 2003 05:51 AM



All times are GMT -4. The time now is 08:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.