xml instead of ini
Hi,
I still use ini-files to get/store information - for different reasons - and
thinking of replacing them with xml-files. Is this possible? if so, how do I
navigate in a xml-file using vba?
// Ulf Tag: How to tell if a word is within a MERGEFIELD? Tag: 116040
Save a document ever 'n' minutes
Is there a way to save an already saved document every 'n' minutes?
I think of the same kind of idea that excists in Excel.
Any hints on writing ap routine? Tag: How to tell if a word is within a MERGEFIELD? Tag: 116030
How to find only words consisting of upper case characters and how
Hello.
There is code that copy all upper case words into end of document
(thank's Jean-Guy Marcil and others):
Dim rngDoc As Word.Range
Dim wu As Word.Range
Dim lngDocEnd As Long
Set rngDoc = ActiveDocument.Range
lngDocEnd = rngDoc.End
For Each wu In rngDoc.Words
If wu.Case = wdUpperCase Then
ActiveDocument.Range.InsertAfter vbCrLf & wu.Text
rngDoc.End = lngDocEnd
End If
Next wu
However if the text contains as well as single characters (upper case)
they too will copy with words. I tried to add condition of checking of
amount characters into found words (>=2) but I got too one character
and space. If I change of amount characters to 3, then word consisting
of 2 symbols will lost
Question: how to check and get only words (upper case) and How exclude
repeating words from found?
Thank you very much. Tag: How to tell if a word is within a MERGEFIELD? Tag: 116022
References Option Greyed Out
Hello all,
When I select Tools > References in the VBA Editor, the References
option is greyed out. This only happens in Microsoft Word, not in
Excel. Any suggestions as to why and how to fix it?
In the interest in sharing all the info I have, I can also only edit
this template at all if I have it open at the time. I can't add it as
an add-in to a different document and then edit it. Is that normal?
It will say it's locked or something similar.
Thanks for any help
CJ Tag: How to tell if a word is within a MERGEFIELD? Tag: 116014
Delete a Line
Hello,
Is there a way to delete the first line (or just remove whatever is on the
first line) in a word document?
I have four commandButtons on the first line in my word doc that I want to
be removed when I run a macro I have that sends the document in the body of
an email message.
I was searching through the object browser and came accross
wdUnits(wdLines). Was I on the right path with that? Tag: How to tell if a word is within a MERGEFIELD? Tag: 116012
How to format values in a table ?
I have a word table that has a cell containing a numerical value... I want
to add leading zeros to this value via a formula...
I am new to Word VBA, but I know that this can be done using Access VBA.
Apparently Word VBA <> Access VBA correct ?
Otherwise this should work....
Format$(Fieldname, "000000")
or
Right$("000000" & Trim$(Fieldname), 6)
Any Word Equivalents for these ? Tag: How to tell if a word is within a MERGEFIELD? Tag: 116011
file "Properties"
Properties function in Excel or Word tells when created, accessed and
edited.
How do you lock someone out of this view? When a third party is sent
an Excel or Word file via email, and they click on File...Properties,
I don't want them to access the "Properties".
How can this be accomplished???? Tag: How to tell if a word is within a MERGEFIELD? Tag: 116003
How can I modify a style in a macro?
I'm assuming this will work to turn on bold for example:
With ActiveDocument.Styles("Body Text").Font
.Bold = True
End With
But, since numbering sits higher in the Word object model, how would I
modify say the "Aligned At" setting located in the Numbering dialog box? Any
help would be greatly appreciated. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115999
Lingering Message Boxes
After clicking OK in a user form, I have a message box pop up telling the
user what step to do next. When they click OK to that, one more message box
pops up to remind them of other details. However, the first one lingers on
the screen in the background while the second one overlays it. Can I
programmatically tell the first message box to hide/close after the user
clicks OK on it? Thanks!
--
Steve C Tag: How to tell if a word is within a MERGEFIELD? Tag: 115996
Add Controls Dynamcally part 2
I want to be able to assign an "on action" consequence to activity taken in
a dynamically created textbox.
Can I add create "enter" and "exit" and "change" features for these
dynamically created controls?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115992
Problem with Hidden Property of a Range
Hi,
The following is an excerpt of code that sets a range going from row 2 of a
table to the last row and Hides it. It is intended to hide the range only
when needed (i.e., when it is not already hidden).
'============== Excerpt ==================
If NumOfRows > 1 Then
Set TypeOfInspCell = ActiveDocument.Range( _
Start:=otable.Rows(2).Range.Start, _
End:=otable.Rows(NumOfRows).Range.End)
If TypeOfInspCell.Font.Hidden = True Then
Exit Sub
Else
TypeOfInspCell.Font.Hidden = True
End If
End If
'===========================================
Nevertheless, when debugging, I realized that "TypeOfInspCell.Font.Hidden"
is always equal to 9999999, so it always goes through the else (even when the
range is already hidden).
Let me note that the alternate method of checking whether row 2 of the table
is hidden or not, does not work, since it may very well happen that Row 2 is
hidden but row 3 is unhidden. I'd have to loop through each row to detect
whether they're all hidden. Although this method does give
"TypeOfInspCell.Font.Hidden" a defined value, due to the tables massive size
of the tables, it takes too long to run.
Is there anyway I could make my initial code work?? Or is there any other
efficient method to accomplish this?
Thank you,
Juan Manuel Tag: How to tell if a word is within a MERGEFIELD? Tag: 115991
Determining screen size
I've got some macros for positioning and sizing the word window but currently
am using hard coded numbers for width, height, left and top parameters. These
numbers were obtained empirically for my desktop. When I take documents to my
laptop with different screen dimensions, these macros do not produce the
intended effect.
I am simply asking how I can determine the screen dimensions and how they
relate to the word window. It appears I may have to take title bars and word
task bar into account. I was wondering if anyone has either figured this all
out or better yet has code that does this. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115990
How could I have saved memory?
I threw together a macro in Word 2007 yesterday, but it kept
interrupting. There was no error, but I'd get the annoying message
box that says "Code execution has been interrupted." and the CONTINUE,
END, and DEBUG buttons. I've learned this is usually an indication
that I'm stretching the capacity of my memory - all I have to do is
hit CONTINUE and it runs along just fine - until it interuupts again!!
I had tables in a Word doc with reprot numbers in one column, and
several more blank columns. The data to fill in those blanks was
mostly in an Excel spreadsheet. One blank, though, could only be
filled in by finding the report document and grabbing one line of
text.
So the macro was designed to set an object to the table I had selected
and iterate down the report numbers, open the spreadsheet and find the
needed values for that report, then open the report, grab the one line
of text, and close the report. Lather, rinse, repeat until the end of
the table.
Can someone see where I could have saved memory overhead and made this
run a bit smoother?
Ed
Sub EnterMyInfo()
Dim doc As Document
Dim tbl As Table
Dim str As String
Dim cll As Word.Cell
Dim tir As Document
Dim this As Range
Dim oXL As Excel.Application
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
Dim xlcll As Excel.Range
Dim x As Long, y As Long
Dim a As Long, b As Long
Dim vlu
Set doc = ActiveDocument
Set tbl = Selection.Tables(1)
Set oXL = New Excel.Application
Set wkb = oXL.Workbooks.Open("C:\MyFile.xls")
oXL.Visible = True
Set wks = wkb.Worksheets("Sheet1")
a = wks.Range("A20000").End(xlUp).Row
x = tbl.Rows.Count
For y = 1 To x
Application.StatusBar = "Row " & y & " of " & x
Set cll = tbl.Cell(y, 1)
If Left(cll.Range.Text, 5) = "L5-BB" Then
str = Left(cll.Range.Text, 10)
For b = 2 To a
If wks.Range("B" & b).Value = str Then Exit For
Next b
'Stop
'**********
'vlu was deliberately left undefined
'so I could adjust it depending on the table.
'**********
vlu = Format(wks.Cells(b, 3).Value, "mm/dd/yyyy")
tbl.Cell(y, 2).Range.Text = vlu
vlu = Format(wks.Cells(b, 5).Value, "####0.0")
tbl.Cell(y, 3).Range.Text = vlu
'tbl.Cell(y, 4).Range.Text = wks.Cells(b, 7).Value
Set tir = Word.Application.Documents.Open(FileName:="\\Server1\ &
str & ".doc")
tir.PageSetup.LeftMargin = InchesToPoints(0.75)
tir.PageSetup.RightMargin = InchesToPoints(0.75)
Set this = tir.Content
With this.Find
.Text = "|90. "
.Execute
this.Collapse wdCollapseEnd
this.MoveEndUntil "|", wdForward
tbl.Cell(y, 4).Range.Text = Trim(this.Text)
End With
'Stop
tir.Close wdDoNotSaveChanges
Set tir = Nothing
End If
Next y
EndMeNow:
On Error Resume Next
wkb.Close
oXL.Quit
Set oXL = Nothing
On Error GoTo 0
MsgBox "I'm done!"
End Sub Tag: How to tell if a word is within a MERGEFIELD? Tag: 115988
Adding Shapes To Headers
Why Picture is added to even page while Line and TextEffect is always added
to odd pages in the next code? I run this macro in Word 2003 on document with
different headers for first, even and odd pages. In the Word 2007 Picture is
added to the first page while Line and TextEffect still to odd. Any ideas?
Sub HeaderShapes()
With ActiveDocument
.Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddPicture
"c:\WINDOWS\Coffee Bean.bmp"
.Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddTextEffect
msoTextEffect1, "12345", "Times New Roman", 12, msoFalse, msoFalse, 0, 0
.Sections(1).Headers(wdHeaderFooterEvenPages).Shapes.AddLine 0, 0, 100, 100
End With
End Sub
Thanks for help in advance. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115986
Macros
Hello can somebody please help me. I have created the following macros:
Sub PrintLH()
'
' PrintLH Macro
'
'
Options.DefaultTray = " Tray 1"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
Options.DefaultTray = " Tray 2"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub PrintOneTop()
'
' PrintOneTop Macro
'
'
Options.DefaultTray = " Tray 1"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub PrintOneBottom()
'
' PrintOneBottom Macro
'
'
Options.DefaultTray = " Tray 2"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub PrintFullDocTop()
'
' PrintFullDocTop Macro
'
'
Options.DefaultTray = " Tray 1"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sub PrintFullDocBottom()
'
' PrintFullDocBottom Macro
'
'
Options.DefaultTray = " Tray 2"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
The macros are:
a) Print one copy from top tray and one from bottom tray
b) Print one copy from top tray
c) Print one copy from bottom tray
d) Print full document from top tray
e) Print full document from bottom tray
However, when I run the Macros they sometimes do what they should and
sometimes they don't. I have to go in to my printer set up and change the
printer setting back to default printer and it then works again. After
running the macros a couple of times when I run the 'a)' macros - one top one
bottom they print from the same tray.
Can somebody advise please?
Thanks.
Sharon Tag: How to tell if a word is within a MERGEFIELD? Tag: 115983
ListGalleries and OrganizerCopy
Hello again. This is complicated to put into a few words, but I'll try.
VS2005 addin for Word 2007.
When Word starts it runs the addin, part of which changes the Default font
name and size, and the linespacing, this is applied to the existing "Normal"
using the OrganizerCopy. This works well. I also want it to set a custom
OulineNumbered List which is created as the addin runs. No problem creating
the list, except for 2 things
1.
applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates("StyleDocument7"),
ContinuePreviousList:=False, _
ApplyTo:=Word.WdListApplyTo.wdListApplyToSelection, _
DefaultListBehavior:=wdWord10ListBehavior)
I dont know what to declare the "wdWord10ListBehavior" as, or even if it is
necessary.
and
2.
Can the OrganizerCopy cope with copying this list to be the Default on the
Normal as below:
applicationObject.OrganizerCopy(Source:=applicationObject.ActiveDocument.FullName, _
Destination:=applicationObject.ActiveDocument.AttachedTemplate.FullName, _
Name:="Normal", Object:=Word.WdOrganizerObject.wdOrganizerObjectStyles)
I have taken the "DefaultListBehavior:=wdWord10ListBehavior" out and
rebuild/installed it, but it hasn't become Words default OulineNumbered list.
Any ideas
Many thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115978
CentimetersToPoints
Hello
I'm creating a custom outline numbered list with the code below and am
struggling to find the correct references for the CentimetersToPoints. The
error checking tooltiptext returns "Name 'CentimetersToPoint' is not
declared."
Can anybody help?
Private applicationObject As Word.Application
Public Sub OnStartupComplete(ByRef custom As System.Array) Implements
Extensibility.IDTExtensibility2.OnStartupComplete
With
applicationObject.ListGalleries(Word.WdListGalleryType.wdOutlineNumberGallery).ListTemplates(1).ListLevels(1)
.NumberFormat = "%1"
.TrailingCharacter = Word.WdTrailingCharacter.wdTrailingTab
.NumberStyle = Word.WdListNumberStyle.wdListNumberStyleArabic
.NumberPosition = CentimetersToPoints(0)
.Alignment = Word.WdListLevelAlignment.wdListLevelAlignLeft
.TextPosition = CentimetersToPoints(1.27)
.TabPosition = CentimetersToPoints(1.27)
.ResetOnHigher = 0
.StartAt = 1
With .Font
.Bold = 0
.Italic = 0
.StrikeThrough = 0
and so on........
Thankyou Tag: How to tell if a word is within a MERGEFIELD? Tag: 115975
Copy one single style from another document or template
Hi All,
I want to copy one single style document A to document B.
I've found some article to update all style from the attached template to
the activedocument. But I need the logic to copy one single style.
Actually, I can copy the text from the source document with that particular
style and copy it to the target document. However, I would like not to touch
or change the text within the target document.
Is that any way that I could do it ? Many Thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115973
Restrict Find to specific range in a document
I have to search the first cell of the first table in each section of a
multi-section document for words in Arial Black.
I tried code like this:
With doc.Sections(intSection).Range.Tables(1).Cell(1, 1).Range.Find
.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.Font.Name = "Arial Black"
Do While .Execute
strTag = .Parent.Text
...
Loop
End With
If the cell doesn't contain Arial Black, all is ok. Find doesn't go beyond
the cell. But when it does contain a word in Arial Black, the first
occurence is correctly passed to the variable, but subsequent Executes in
the loop go beyond the cell boundaries. I understand this is because Execute
redefines the range to the text found when successfull.
I can make the loop work with below changes, basically checking is the found
range is still withing the same cell. But that makes the algorithm
unacceptably slow. I realize I can optimize the loop by not evaluating all
four Information data when the first ones fail, but my solution seems so
complicated for a not so far fetched task. Any other ideas?
Tx,
Eddy.
Set rngWordFind = doc.Sections(intSection).Range.Tables(1).Cell(1, 1).Range
With rngWordFind.Find
.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
.Font.Name = "Arial Black"
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do While .Execute
blnInfoWithinTable = rngWordFind.Information(wdWithInTable)
intInfoSection = rngWordFind.Information(wdActiveEndSectionNumber)
intInfoCol = rngWordFind.Information(wdStartOfRangeColumnNumber)
intInfoRow = rngWordFind.Information(wdStartOfRangeRowNumber)
If blnInfoWithinTable = True And intInfoSection = intSection And
intInfoRow = 1 And intInfoCol = 2 Then
strTag = rngWordFind.Find.Parent.Text
Else
Exit Do
End If
Loop
End With Tag: How to tell if a word is within a MERGEFIELD? Tag: 115972
setting Shape.WrapFormat.Type failing with RPC_E_SERVER_FAULT
Hello All,
I'm using Word automation using VS2005 and C#.
I'm facing a strange problem while setting Shape.WrapFormat.Type to
Word.WdWrapType.wdWrapSquare.
In all the machines where our application runs(German & English MS-Word),
the following line is getting executed fine except in one machine where it
failed with RPC_E_SERVER_FAULT exception.
shape.WrapFormat.Type = Word.WdWrapType.wdWrapSquare;
That machine has Word2003 with SP3. Even its failing in that machine when
we try to get the WrapFormat.Type property.
Please find below the exception call stack
//While getting the property WrapFormat.Type
23.07.2008 08:08:49 Exception
Type=System.Runtime.InteropServices.COMException
Message=Beim Aufruf einer COM-Komponente wurde ein HRESULT E_FAIL-Fehler
zurückgegeben.
Stack=
bei Word.WrapFormat.get_Type()
bei WordAutomation.AddText(Shape shape, String text)
//While setting the property WrapFormat.Type
21.07.2008 14:08:44 Exception
Type=System.Runtime.InteropServices.COMException
Message=Ausnahmefehler des Servers. (Ausnahme von HRESULT: 0x80010105
(RPC_E_SERVERFAULT))
Stack=
bei Word.WrapFormat.set_Type(WdWrapType prop)
bei WordAutomation.AddText(Shape shape, String text)
Can you please throw some light why this can happen. Can you please reply me
back asap. And this PC has German Word and German XP.
Thanks
Best Regards Tag: How to tell if a word is within a MERGEFIELD? Tag: 115971
Log File
I am working on a macro to process several files in a folder. I would like
to create a text file to log of each files opened and the results of the
processing.
I have seen something similiar but I can't seem to locate it and I don't
know where to start from scratch.
Thanks..
--
Greg Maxey - Word MVP
My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org Tag: How to tell if a word is within a MERGEFIELD? Tag: 115967
Sending as attachment
Hi all,
I have some code that send the document as an attachment throught Outlook.
The file contains many linked objects to excel files and such. The problem is
when i send the document(I have security set-up with a password and all) and
the receiver recieves the attachment they still have the option to update the
links. Is the a way to send it as like an image of the document which would
remove all the links and just have say "placeholders" for them without being
linked?
'SEND REPORT AS ATTACHMENT
Dim bStarted As Boolean
Dim oOutlookApp As Outlook.Application
Dim oItem As Outlook.MailItem
On Error Resume Next
If Len(ActiveDocument.Path) = 0 Then
MsgBox "Document needs to be saved first"
Exit Sub
End If
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olmailitem)
Dim iDay As Integer
Dim iMonth As Integer
Dim dtYesterday As Date
dtYesterday = DateAdd("d", -1, Now)
iDay = DatePart("d", dtYesterday)
iMonth = DatePart("m", dtYesterday)
'Here you can edit the To:, CC:, and Subject: of the mail item
With oItem
.To = InputBox("Fill-In who you would like to send this Report to.",
"To:", "Email@mail.com")
.CC = InputBox("Would you like to CC: this email to someone?" &
vbCrLf & _
vbCrLf & "If yes fill-in who you would like to CC: the email
to and click OK:" & vbCrLf & "Else just click Cancel.", "CC:")
.Subject = InputBox("Fill-in the subject for this email:",
"Subject:", ".COM Daily Operational Report " & _
CStr(iDay) & "-" & MonthName(iMonth) & "-" & Year(Date))
'Add the document as an attachment
'you can use the .displayname property to set the description that's
used in the message
.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue,
DisplayName:="Document as attachment"
.Display
'.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
_____________________
SOME LINES ARE CUT SHORT... Tag: How to tell if a word is within a MERGEFIELD? Tag: 115961
Numerical value of the table cell
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C8EC3D.64412410
Content-Type: text/plain;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
Hello,
How is it possible to obtain the numerical value of the Word table cell =
using VBA? For example,
Dim Table1 As Table
Set Table1 =3D ThisDocument.Tables.Item(1)
The problem is to convert Table1.Cell(1,1) to the value of the numerical =
type.
Sincerely,
Aleksander
------=_NextPart_000_000D_01C8EC3D.64412410
Content-Type: text/html;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1251">
<META content=3D"MSHTML 6.00.2900.2912" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DArial><FONT size=3D2>
<BODY>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>How is it possible to obtain the numerical value of the Word table =
cell=20
using VBA? For example,</DIV>
<DIV> </DIV>
<DIV>Dim Table1 As Table</DIV>
<DIV>Set Table1 =3D ThisDocument.Tables.Item(1)</DIV>
<DIV> </DIV>
<DIV>The problem is to convert Table1.Cell(1,1) to the value of the =
numerical=20
type.</DIV>
<DIV> </DIV>
<DIV>Sincerely,</DIV>
<DIV>Aleksander</DIV>
<DIV> </DIV></BODY></HTML></FONT></FONT>
------=_NextPart_000_000D_01C8EC3D.64412410-- Tag: How to tell if a word is within a MERGEFIELD? Tag: 115954
One Source Doc --> Many Styles to Apply
Word 2003 - SP3 XP Home - SP2 Sorry for the cross post from General. I
think it may come to code to force style application, so please read.
We have dozens of source docs with coordinated style names matching several
templates that have the same names but modified formatting. The idea is to
create a new doc from the right template & paste in the source doc to assume
the new template styles. Good idea but cannot make it work.
The styles are carrying the list type as a prefix e.g.; 5.0 Pro_Header & 1)
Pro_Header and my guess is that keeps them from matching up. In the style
definitions they both are Pro_Header without mention of number style.
I really, really must make this work and soon and will appreciate any help
or point to a direction, etc. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115944
Problem with Table of contents and styles
Hi,
I am developing a macro which does the following:
a. Copy multiple documents in a single document.
b. Have separate table of contents (TOC) for each document copied.
i.e. If I copy 10 documents in a single document, say doc1.doc,
doc1.doc will have 10 TOCs for the 10 documents copied.
I am able to do the part (a).
What I am planning to do for (b) is,
1. Search for the text 'chapter1', 'chapter2' etc in the document
doc1.doc(to build the TOC). I am doing this with .Find
2. As soon as I get 'Chapter1', place a bookmark and replace the style
with a custom style. Do this till the end of the document.
3. Find the bookmark, go to that location and insert the TOC. The TOC
will be built on the custom style.
I am stuck at point 2. I am able to find the desired text, but when i
try to change the style, it is not changing.
Here is the code:
Dim WordApp as Word.Application
With WordApp.Selection.Find
.Forward = True
.MatchWholeWord = True
.MatchCase = False
.Execute FindText:="Ambarish"
If .Found = True Then
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
Selection.Style = ActiveDocument.Styles("Ambarish")
End If
End With
Style "Ambarish" is present in the document which is a paragraph
style.
I also tried another approach. Instead of finding the text 'Chapter1',
I tried to search on the style "Normal + Tahoma, 16 pt, Bold". But,
when I printed the available styles and font, I only got "Normal",
"Times New Roman", font 10.
What can be the reason for this, and how do I find the style?
Can anybody help me on this issue?
Thanks in advance.
Regards,
Ambarish Tag: How to tell if a word is within a MERGEFIELD? Tag: 115941
Replace part of a string by another string
Hi,
I want to replace part of a string by another string. For example,
Dim A as string
A="I have a car. He has a house"
If "car" is to be replaced by "boat", how can I do that?
(So, A becomes "I have a boat. He has a house")
Thanks.
Mike Tag: How to tell if a word is within a MERGEFIELD? Tag: 115940
Commenting Bubbles in Word 2007...
I am using a simple VBA command (in combination with a custom ribbon) to
insert Comments.
Here's the code:
Selection.Comments.Add Range:=Selection.Range, Text:=MyText
I'm wondering:
1) If there is any way to get rid of the word "Comment" that automatically
appears
and
2) If I can automatically put formatted text into the Comment. That is, the
MyText variable above is plain text, but I'd like to include automatically
formatted bullets and hyperlinks. I tried to do it via macro but ended up
formatting the text of the actual document, not the text going into the
bubble.
Many thanks in advance for any help. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115939
Ribbon tabs
Hello all
Any idea how to make a ribbon tab visible when a document is loaded and
hidded when it is closed?
Thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115938
2007 File New intercept Encrypt Password
Does anyone now if it is possible to add to my File New macro (and how) to
put in the password for Encrypted document templates so they stay encrypted
but allow the new document to be created?
I can post my File New intercept if that helps for my templates.
Many thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115927
Add Controls Dynamcally part 2
I want to be able to assign an "on action" consequence to activity taken in
a dynamically created textbox.
Can I add create "enter" and "exit" and "change" features for these
dynamically created controls?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115919
Add Controls Dynamically, part 2
I want to be able to assign an "on action" consequence to activity taken in
a dynamically created textbox. Can I add "enter" and "exit" and "change"
features?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115918
Add Controls Dynamically, part 2
I want to be able to assign an "on action" consequence to activity taken in
a dynamically created textbox. Can I add "enter" and "exit" and "change"
features?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115917
Add Controls Dynamically, part 2
I want to be able to assign an "on action" consequence to activity taken in
a dynamically created textbox. Can I add "enter" and "exit" and "change"
features?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115916
Making Word play a sound
G'day!
I have a template with a timer in a loop. I'd like Word to play a sound each
time the loop increments. I know I can use the Beep function to do this, but
that just plays the 'Default Beep' as specified in Windows - which, depending
on the settings, can be somewhat... umm... less than pleasant. Of course, I
can always change the 'Default Beep' to something a bit more appealing, but I
may be distributing this template to others who either don't want to change
their 'Default Beep' or don't have even the limited knowledge required to do
so.
Is there a way to have Word play a specific sound? Or am I stuck with Beep?
(And yes, I know that other users might not have the sound file - but I can
always distribute it and install it in a known location...)
--
Cheers!
Gordon
Uninvited email contact will be marked as SPAM and ignored. Please post all
follow-ups to the newsgroup. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115910
Fixing toolbars in place
I find that toolbars move to different locations on by desktop when I open
other programs and return to a Word file. I need a way to fix toolbars in
place, or a macro that will move them to preset locations when I need them to
go where they belong.
Thanks
Roger@stargroup.com Tag: How to tell if a word is within a MERGEFIELD? Tag: 115902
Check Box Form Question (MS Word 2002 XP)
Hello:
I'm creating a form for a user and would like to know if there is a way to
have a check mark appear/disappear inside the checkbox with one click of the
mouse?
What I'm experiencing now is that I have to "double-click" the checkbox, a
Check Box Form Field Option dialog box shows up, and then I change the
default value to "checked" or "not checked", and finally I click OK.
Thank you for your help!
Tom Tag: How to tell if a word is within a MERGEFIELD? Tag: 115901
Creating a wizard to step a user through the document
Hello all. I'm an "extreme" newbie to VBA, and I'm having a heckuva
time figuring things out.
I've got a document that I need basically five user forms, one to
choose the form, and one each for the separate document forms. I've
got the first one set, now I'm looking to do the four main forms, and
I need to give the user an option to insert an image if a checkbox is
clicked.
I have to admit that most of the stuff I've seen for this online have
been a bit... dense fro me to understand, so I'm hoping you all can
help!
Is there someplace I can look that has help for the beginner on this
stuff? I was kinda thrown into the VBA deep end at work and have no
idea what I'm doing! :)
Thanks!
~Mike Tag: How to tell if a word is within a MERGEFIELD? Tag: 115896
Problem with Worksheet and Table cells
This is a multi-part message in MIME format.
------=_NextPart_000_009B_01C8EB60.5A5EF720
Content-Type: text/plain;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
=20
Hello,
I am assigning the values of the Word document Table cells to the values =
of the Excel Worksheet cells in the Word document=20
with the following code:
Cells(1, 1).Value =3D Table1.Cell(1, 1) or .Range("A1").Value =3D =
Table1.Cell(1, 1)
Symbols with ASCII codes 0D 0A 07 are added to the end of the Excel =
Worksheet cells. How is it possible to avoid this?
Sincerely,
Aleksander
------=_NextPart_000_009B_01C8EB60.5A5EF720
Content-Type: text/html;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1251">
<META content=3D"MSHTML 6.00.2900.2912" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DArial><FONT size=3D2>
<BODY>
<DIV>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I am assigning the values of the Word document Table cells to the =
values of=20
the Excel Worksheet cells in the Word document </DIV>
<DIV>with the following code:</DIV>
<DIV> </DIV>
<DIV>Cells(1, 1).Value =3D Table1.Cell(1, 1) or .Range(<SPAN=20
style=3D"COLOR: #800080">"A1"</SPAN>).Value =3D Table1.Cell(1, 1)</DIV>
<DIV> </DIV>
<DIV>Symbols with ASCII codes 0D 0A 07 are added to the end of the =
Excel=20
Worksheet cells. How is it possible to avoid this?</DIV>
<DIV> </DIV>
<DIV>Sincerely,</DIV>
<DIV>Aleksander</DIV></DIV></BODY></HTML></FONT></FONT>
------=_NextPart_000_009B_01C8EB60.5A5EF720-- Tag: How to tell if a word is within a MERGEFIELD? Tag: 115893
Word Macro - Remove Drop Down Box
Hello,
I am trying to determine if this is possible in word.
I have a Word form with a drop down box. The drop down box would have two
options. Option #1 is keep a sentence that is already in the document and
Option #2 is remove that same sentence. (The sentence is only used in some
cases)
Once selecting the option could I have the drop down box deleted?
Let me know if this is possible.
Thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115891
How to determine type of inserting of image into document?
Hello. I need to determine type of inserting of selected image: embed
or related (Selection.Fields(1).Type = wdFieldIncludePicture). How can
I do it?
Thank you very much! Tag: How to tell if a word is within a MERGEFIELD? Tag: 115889
opening Word document in axwebbrowser
C# - Visual Studio 2005 - Word 2003 - Windows XP
I have created a custom button and added it to the MS Word Standard Toolbar.
On clicking this button, i get a Windows Form that states weather the Current
active document is saved or not saved.
When i open any Word document in an AxwebBrowser object inside a Windows
Form, i find the standard toolbar and see my custom button. It works just
fine.
But when i run another instance of the Application and open another file in
the AxWebBrowser, i find that i am able to use the Custom button only in the
second instance of the application. In the Earlier(First instance) i am not
able to even click the button. No only that, all the buttons in the toolbar
do not seem to function at all(Bold...Italic...Allignment etc)
Why is this happening and how can i resolve it. Please help. Thankyou. Tag: How to tell if a word is within a MERGEFIELD? Tag: 115885
Reset character while retaining/restoring font style
Word documents often contain lots of so-called smart tags which show up in a
translation program I use as junk placeholder codes({1}, {2}, {3}, etc.)
between, and sometimes even in the middle of, words.
One way of getting rid of these codes is to do a Reset character (control +
spacebar) on the whole document.
Unfortunately, this also removes character formatting (bold, italic,
underline, font colour, size, etc.).
I tried to expand on some code examples by Helmut Weber to do a reset font
while retaining charactering formatting.
The macro seems to work quite well (apart from underline which for some
reason I had to do at individual character level to avoid spaces between word
being underlined when the formatting is restored).
I would now like to try and improve it so as to retain (restore) any text
formatted using character styles as well as direct formatting and would be
very grateful for any tips or examples.
Hereâ??s the code:
Sub ResetDupFont4()
Application.ScreenUpdating = False
Dim rPrg As Paragraph ' a paragraph
Dim rSnt As Range ' a sentence
Dim rWrd As Range ' a word
Dim rChr As Range ' a character
Dim dupFont As Font ' font duplicate in range
For Each rPrg In ActiveDocument.Paragraphs
If rPrg.Range.Font.Bold <> 9999999 _
And rPrg.Range.Font.Italic <> 9999999 _
And rPrg.Range.Font.Underline <> 9999999 _
And rPrg.Range.Font.SmallCaps <> 9999999 _
And rPrg.Range.Font.AllCaps <> 9999999 _
And rPrg.Range.Font.Outline <> 9999999 _
And rPrg.Range.Font.Emboss <> 9999999 _
And rPrg.Range.Font.Shadow <> 9999999 _
And rPrg.Range.Font.Engrave <> 9999999 _
And rPrg.Range.Font.strikethrough <> 9999999 _
And rPrg.Range.Font.DoubleStrikeThrough <> 9999999 _
And rPrg.Range.Font.Superscript <> 9999999 _
And rPrg.Range.Font.Subscript <> 9999999 _
And rPrg.Range.Font.Hidden <> 9999999 _
And rPrg.Range.Font.Color <> 9999999 _
And rPrg.Range.Font.Size <> 9999999 _
And rPrg.Range.Font.Name <> "" Then
Set dupFont = rPrg.Range.Font.Duplicate
rPrg.Range.Font.Reset
rPrg.Range.Font = dupFont
ElseIf rPrg.Range.Font.Bold = 9999999 _
Or rPrg.Range.Font.Italic = 9999999 _
Or rPrg.Range.Font.Underline = 9999999 _
Or rPrg.Range.Font.SmallCaps = 9999999 _
Or rPrg.Range.Font.AllCaps = 9999999 _
Or rPrg.Range.Font.Outline = 9999999 _
Or rPrg.Range.Font.Emboss = 9999999 _
Or rPrg.Range.Font.Shadow = 9999999 _
Or rPrg.Range.Font.Engrave = 9999999 _
Or rPrg.Range.Font.Superscript = 9999999 _
Or rPrg.Range.Font.Subscript = 9999999 _
Or rPrg.Range.Font.Hidden = 9999999 _
Or rPrg.Range.Font.Color = 9999999 _
Or rPrg.Range.Font.Size = 9999999 _
Or Not rPrg.Range.Font.Name <> "" Then
For Each rSnt In rPrg.Range.Sentences
If rSnt.Font.Bold <> 9999999 _
And rSnt.Font.Italic <> 9999999 _
And rSnt.Font.Underline <> 9999999 _
And rSnt.Font.SmallCaps <> 9999999 _
And rSnt.Font.AllCaps <> 9999999 _
And rSnt.Font.Outline <> 9999999 _
And rSnt.Font.Emboss <> 9999999 _
And rSnt.Font.Shadow <> 9999999 _
And rSnt.Font.Engrave <> 9999999 _
And rSnt.Font.strikethrough <> 9999999 _
And rSnt.Font.DoubleStrikeThrough <> 9999999 _
And rSnt.Font.Superscript <> 9999999 _
And rSnt.Font.Subscript <> 9999999 _
And rSnt.Font.Hidden <> 9999999 _
And rSnt.Font.Color <> 9999999 _
And rSnt.Font.Size <> 9999999 _
And rSnt.Font.Name <> "" Then
Set dupFont = rSnt.Font.Duplicate
rSnt.Font.Reset
rSnt.Font = dupFont
ElseIf rSnt.Font.Bold = 9999999 _
Or rSnt.Font.Italic = 9999999 _
Or rSnt.Font.Underline = 9999999 _
Or rSnt.Font.SmallCaps = 9999999 _
Or rSnt.Font.AllCaps = 9999999 _
Or rSnt.Font.Outline = 9999999 _
Or rSnt.Font.Emboss = 9999999 _
Or rSnt.Font.Shadow = 9999999 _
Or rSnt.Font.Engrave = 9999999 _
Or rSnt.Font.Superscript = 9999999 _
Or rSnt.Font.Subscript = 9999999 _
Or rSnt.Font.Hidden = 9999999 _
Or rSnt.Font.Color = 9999999 _
Or rSnt.Font.Size = 9999999 _
Or Not rSnt.Font.Name <> "" Then
For Each rWrd In rSnt.Words
If rWrd.Font.Bold <> 9999999 _
And rWrd.Font.Italic <> 9999999 _
And rWrd.Font.Underline = False _
And rWrd.Font.SmallCaps <> 9999999 _
And rWrd.Font.AllCaps <> 9999999 _
And rWrd.Font.Outline <> 9999999 _
And rWrd.Font.Emboss <> 9999999 _
And rWrd.Font.Shadow <> 9999999 _
And rWrd.Font.Engrave <> 9999999 _
And rWrd.Font.strikethrough <> 9999999 _
And rWrd.Font.DoubleStrikeThrough <> 9999999 _
And rWrd.Font.Superscript <> 9999999 _
And rWrd.Font.Subscript <> 9999999 _
And rWrd.Font.Hidden <> 9999999 _
And rWrd.Font.Color <> 9999999 _
And rWrd.Font.Size <> 9999999 _
And rWrd.Font.Name <> "" Then
Set dupFont = rWrd.Font.Duplicate
rWrd.Font.Reset
rWrd.Font = dupFont
ElseIf rWrd.Font.Bold = 9999999 _
Or rWrd.Font.Italic = 9999999 _
Or rWrd.Font.Underline = True Or 9999999 _
Or rWrd.Font.SmallCaps = 9999999 _
Or rWrd.Font.AllCaps = 9999999 _
Or rWrd.Font.Outline = 9999999 _
Or rWrd.Font.Emboss = 9999999 _
Or rWrd.Font.Shadow = 9999999 _
Or rWrd.Font.Engrave = 9999999 _
Or rWrd.Font.strikethrough = 9999999 _
Or rWrd.Font.DoubleStrikeThrough = 9999999 _
Or rWrd.Font.Superscript = 9999999 _
Or rWrd.Font.Subscript = 9999999 _
Or rWrd.Font.Hidden = 9999999 _
Or rWrd.Font.Color = 9999999 _
Or rWrd.Font.Size = 9999999 _
Or Not rWrd.Font.Name <> "" Then
For Each rChr In rWrd.Characters
Set dupFont = rChr.Font.Duplicate
rChr.Font.Reset
rChr.Font = dupFont
Next
End If
Next
End If
Next
End If
Next
End Sub
I tried to add this code for character styles, but it doesnâ??t seem to work
very well:
.
.
.
And rPrg.Range.Style.Type <> wdStyleTypeCharacter Then
Set dupFont = rPrg.Range.Font.Duplicate
rPrg.Range.Font.Reset
rPrg.Range.Font = dupFont
ElseIf rPrg.Range.Style.Type = wdStyleTypeCharacter Then
rPrg.Range.Select
For Each rChr In Selection.Characters
Set charSty = rChr.Style
Set paraSty = rChr.Paragraphs(1).Style
If charSty <> paraSty Then
rChr.Font.Reset
rChr.Style = charSty
Else
rChr.Font.Reset
End If
Next rChr Tag: How to tell if a word is within a MERGEFIELD? Tag: 115881
How to capture merge range?
I'm using excel file one as the data file for a mail merge.
I need to capture the range of records that is being merged, and at
some point afterwards, open excel file two, copy the range of records
that was merged from file one to file two, and add in the current date
so that I have a record of when the merge was done.
Thank you in advance for any help Tag: How to tell if a word is within a MERGEFIELD? Tag: 115880
Macro to detect whether the table has vertically merged cells before
Dear Experts:
I got a table macro that applies some specific formatting to the
selected table. If the macro hits vertically merged cells I get an
error message showing "5991" as error number. But then some formatting
has already been applied.
So what I would like to get is a code snippet that before the actual
table macro is executed...
...first loops through all rows and columns of a selected table,
...detects whether there are vertically merged cells and
... in case there are any, exits the sub before the actual table macro
is executed.
I hope I have made myself clear.
Any help would me much appreciated.
Thank you very much in advance.
Regards, Andreas Tag: How to tell if a word is within a MERGEFIELD? Tag: 115871
Error when using VBA code
This is a multi-part message in MIME format.
------=_NextPart_000_00C0_01C8EA55.5A9E4260
Content-Type: text/plain;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
Hello,
I am using VBA code in Microsoft Word macros. On some computers it works =
normally, on some I get an error:
Run-time error '430': Class does not support Automation or does not =
support expected interface.
The configuration of computers:
Windows XP Home Edition SP2, Microsoft Office XP. Code works
Windows XP Home Edition SP2, Microsoft Word Standart Edition 2003 for =
Students and Teachers. Code doesn't work.
Can the problem be caused by the version of MDAC? MDAC 2.8 SP1 is =
installed on all computers.
Sincerely,
Aleksander.
------=_NextPart_000_00C0_01C8EA55.5A9E4260
Content-Type: text/html;
charset="windows-1251"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1251">
<META content=3D"MSHTML 6.00.2900.2912" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD><FONT face=3DArial><FONT size=3D2>
<BODY>
<DIV>
<DIV>Hello,</DIV>
<DIV> </DIV>
<DIV>I am using VBA code in Microsoft Word macros. On some computers it =
works=20
normally, on some I get an error:</DIV>
<DIV>Run-time error '430': Class does not support Automation or does not =
support=20
expected interface.</DIV>
<DIV> </DIV>
<DIV>The configuration of computers:</DIV>
<DIV>Windows XP Home Edition SP2, Microsoft Office XP. Code =
works<BR>Windows XP=20
Home Edition SP2, Microsoft Word Standart Edition 2003 for Students and=20
Teachers. Code doesn't work.</DIV>
<DIV> </DIV>
<DIV>Can the problem be caused by the version of MDAC? MDAC 2.8 SP1 is =
installed=20
on all computers.</DIV>
<DIV> </DIV>
<DIV>Sincerely,</DIV>
<DIV>Aleksander.</DIV></DIV></BODY></HTML></FONT></FONT>
------=_NextPart_000_00C0_01C8EA55.5A9E4260-- Tag: How to tell if a word is within a MERGEFIELD? Tag: 115870
Where to put code?
Hello,
I need your advice. I wolud like to create an menu shown when keyborad
shourtcut is clicked in Word Document. I've already created menu as
UserForm in VBA and placed it in the document. Now i would like to be
able to use this menu in new documents created in word, but this new
documents cannot contain any code (no macros, subs, functions, no
vba). I would also like to share document (with ablility to use my
menu) with other users in my office. What is the best what for
desinging solution for this problem?
Best regards,
PK Tag: How to tell if a word is within a MERGEFIELD? Tag: 115869
Hook to grammar check
I have a VBA macro that loops through the current document
highlighting certain sentences.
I would like to highlight sentences that Word's grammar check says are
passive voice.
Is it possible to hook into Word's grammar check functions like this? Tag: How to tell if a word is within a MERGEFIELD? Tag: 115865
Add Controls Dynamically
I want to add a dozen (and perhaps 100) text boxes to a form dynamically.
The 'standard' code is:
Set oTextBox = Me.Controls.Add _
("Forms.TextBox.1", "txtLine" & CurrentCount)
However, as I add each control, I then need to change its attributes (width,
height, font, text alignment) etc. to the configuration I need. With 100 new
text boxes, that could take some time, even on a fast computer. (I know I
need to change "top" and "left", but I was hoping not to have to change
anything else.)
I presume that "Forms.TextBox.1" has the 'default attributes' already built
in.
Can I create a new "Forms.TextBox.1" (maybe a "Forms.TextBox.2") in VBA with
my own attributes?
-Ed (in Virginia) Tag: How to tell if a word is within a MERGEFIELD? Tag: 115859
Save Document Information to SQL Server
We have an online document management system which allows our users to view
the documents via a web interface.
Currently our users use the web functionality to upload the documents but
this proves to be a time consuming task as the drives are internal only.
What we want to do is be able to create functionality in Word which is like
"Save to Doc Manager"
On click of this we want to the users to enter the Contract Id in a textbox
and the macro to be able to Save the file to a pre determined location and a
write an entry into the SQL Server Database i.e. Insert into Document
(ContractId, Filename) Values(40004, 'mycontractdoc.doc')
Is this possible and would be very greatfull for some sample code even if it
an outline.
thanks Tag: How to tell if a word is within a MERGEFIELD? Tag: 115857
Circular text conversion to HTML?
Is there any way to convert the circle of text seen at the URL below
to HTML so that I can make a blog post in that same size and shape of
circle?
<i>I think the request may be for making the boundaries of an area of
regular text
be circular (like a circular text box). There have been several
questions like
that lately.
You can do it by placing appropriate AutoShapes on both sides of the
text and
setting their text wrapping to Tight. I've posted a document at
<b>http://jay-freedman.info/triangle_text.doc</b> that illustrates
making both
triangular and circular text areas.</i> Tag: How to tell if a word is within a MERGEFIELD? Tag: 115852
If have some code looping through the words in a document, identifying
certain ones.
The pseudo-code is: