TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Ah, y'all are too much in love with macros! It'd be easier to make it an
AutoText entry. Set up your table exactly how you want it, select it, make
it an AutoText entry, and then put the entry on a button or a keyboard
shortcut.
Contact me off list if you need more instructions.
-Karen
-----Original Message-----
From: techwr-l-bounces+kmurri=comcast -dot- net -at- lists -dot- techwr-l -dot- com
[mailto:techwr-l-bounces+kmurri=comcast -dot- net -at- lists -dot- techwr-l -dot- com] On Behalf Of
Holly Steele
Sent: Friday, October 27, 2006 8:34 AM
To: Edgar D' Souza
Cc: techwr-l -at- lists -dot- techwr-l -dot- com
Subject: Re: Macros
I would like to teach novice first year technical communication students to
do this in a 15-20 minute workshop. They don't understand the code. Is it
possible to create those table dimensions without going into the macro code?
Holly
On 10/27/06, Edgar D' Souza <edgar -dot- b -dot- dsouza -at- gmail -dot- com> wrote:
>
> On 10/27/06, Holly Steele <techwhirl -at- gmail -dot- com> wrote:
> > Hello everyone
> >
> > I was wondering if it is possible to create a table with specified
> > dimensions in a Word macro.
> >
> > I would like to create a macro in Word with a table set up for side
> headings
> > (the first column at 1.5 inches). When I record the macro, I can
> > insert
> a
> > table, but I can't seem to size it correctly.
> >
> > Any suggestions?
>
> Based on the requirements: create table whose first column is 1.5
> inches wide: this seems to work for me, maybe it'll do what you want.
> I recorded it, then edited the code a bit. BTW, I tested this in Word
> 2000; later versions may exhibit different behaviour.
>
> Sub MakeTable()
> '
> ' MakeTable Macro
> ' Macro recorded 10/27/2006 by Edgar D'Souza '
> Dim tblNew As Word.Table
>
> ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2,
> NumColumns:= _
> 2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
> wdAutoFitWindow
> Set tblNew = Selection.Tables(1)
> tblNew.Columns(1).PreferredWidthType = wdPreferredWidthPoints
> tblNew.Columns(1).PreferredWidth = InchesToPoints(1.5)
>
> 'Remove all borders
> With tblNew
> .Borders(wdBorderTop).LineStyle = wdLineStyleNone
> .Borders(wdBorderLeft).LineStyle = wdLineStyleNone
> .Borders(wdBorderBottom).LineStyle = wdLineStyleNone
> .Borders(wdBorderRight).LineStyle = wdLineStyleNone
> .Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
> .Borders(wdBorderVertical).LineStyle = wdLineStyleNone
> .Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
> .Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
> End With
> End Sub
>
> HTH
> Ed.
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
WebWorks ePublisher Pro for Word features support for every major Help
format plus PDF, HTML and more. Flexible, precise, and efficient content
delivery. Try it today! http://www.webworks.com/techwr-l
Easily create HTML or Microsoft Word content and convert to any popular Help
file format or printed documentation. Learn more at http://www.DocToHelp.com/TechwrlList
---
You are currently subscribed to TECHWR-L as kmurri -at- comcast -dot- net -dot-
WebWorks ePublisher Pro for Word features support for every major Help
format plus PDF, HTML and more. Flexible, precise, and efficient content
delivery. Try it today! http://www.webworks.com/techwr-l
Easily create HTML or Microsoft Word content and convert to any popular Help file format or printed documentation. Learn more at http://www.DocToHelp.com/TechwrlList
---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-