[mso] Re: Word 2002: Create Macro - Insert Textbox doesn't work
- From: Cathy.Evans@xxxxxxxxx
- To: mso@xxxxxxxxxxxxx
- Date: Tue, 28 Sep 2004 14:40:27 -0400
Ray, I am a day late and dollar short in posting this final solution! But
finally got it worked out and wanted to post the revisions I made to your
code to get the 'NA' out of the header/footer and onto a specific
page/section.
The section number in 'ActiveDocument.Sections( 1 ).Range.Select' tells it
where to put the 'NA' stamp, so I will now be adding a specific button to
each page of my document with the pertinent section number to 'stamp'.
Thank you for all your help, I could not have done this without you. Cathy
Private Sub InsertNA_Click()
LabelA = "NA"
WFont = "Arial"
Options.UpdateFieldsAtPrint = True
ActiveDocument.Sections( 1 ).Range.Select
ActiveDocument.Shapes.AddTextEffect(PowerPlusWaterMarkObject1, _
LabelA, WFont, 1, False, False, 0, 0).Select
Selection.ShapeRange.TextEffect.NormalizedHeight = False
Selection.ShapeRange.Line.Visible = False
Selection.ShapeRange.Fill.ForeColor = vbRed
Selection.ShapeRange.Rotation = 315
Selection.ShapeRange.LockAspectRatio = True
Selection.ShapeRange.Height = CentimetersToPoints(8.26)
Selection.ShapeRange.Width = CentimetersToPoints(12.39)
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapNone
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.Align msoAlignCenters, True
Selection.ShapeRange.Align msoAlignMiddles, True
"Ray Blake"
<ray@xxxxxxxxx> To: <mso@xxxxxxxxxxxxx>
Sent by:
mso-bounce@freelist cc:
s.org
09/16/2004 04:44 PM Subject: [mso] Re: Word 2002:
Create Macro - Insert Textbox
Please respond to doesn't work
mso
.....
You should be able to lose that line completely, I think. It's just here
because I can then later refer to it easily to do other stuff. It's
trying to name an object the second time around with a name that already
exists in the doc - hence the hang up. If removing Normal.dot won't fix
it for you, I can only suggest a reboot after deleting Normal.dot and
before starting Word again. Worth a try.
Yes, my code uses the header, so it will watermark every page. I reckon
you should be able to just get it on the current page if you delete
these two lines:
ActiveDocument.Sections(1).Range.Select
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
And also amend this one:
Selection.HeaderFooter.Shapes.AddTextEffect(PowerPlusWaterMarkObject1, _
LabelA, WFont, 1, False, False, 0, 0).Select
- by removing the '.HeaderFooter'
As before, these ideas are untested!
Ray
-----------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain confidential
and/or privileged material. If you are not the intended recipient
of this message you are hereby notified that any use, review,
retransmission, dissemination, distribution, reproduction or any
action taken in reliance upon this message is prohibited. If you
received this in error, please contact the sender and delete the
material from any computer. Any views expressed in this message
are those of the individual sender and may not necessarily reflect
the views of the company.
-------------------------------------------------------------------------------------------------------
*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx
To send mail to the group, simply address it to mso@xxxxxxxxxxxxx
To Unsubscribe from this group, send an email to
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in
the subject line.
Or, visit the group's homepage and use the dropdown menu. This will also allow
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso
To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with
instructions. Once you are a member of the files group, you can go here to
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************
Other related posts: