PowerPoint proofing tools using VBA

G

Guest

I am working with several PowerPoint files that contain sections pasted in
from other documents. As a result, the presentation contains sections that
are formatted with English-US, Brazilian Portuguese, and one or two varieties
of Spanish.

I'm trying to write a VBA program that will change all of the text to either
No Proofing or to one of the languages I work with. But I'm having trouble.
My VBA Help doesn't say anything about proofing tools.

I did find this code fragment on the Internet, and I understand how it
works. Can I add something to the line marked with XXX? What would that be?

= = = = = = = = = = = = = = =

Dim oSld As Slide
Dim oShp As Shape
Dim I As Integer
On Error Resume Next
For Each oSld In ActivePresentation.Slides
For I = oSld.Shapes.Count To 1 Step -1
Set oShp = oSld.Shapes(I)

oShp ' XXX

Next I
Next oSld

= = = = = = = = = = = = = = =

Thanks for any pointers.

* I found you via MVPS.org
 
G

Guest

I am not the one to give you the answer, not good enough yet, but maybe I can
get you going. 1. You will need to look at if the shape has a textframe and
if hastext is true. Then you can read the text. 2. If you type oShp followed
immediately with a period the editor should list all of the methods, objects
and properties of the shape once you click on one you can press period again
to continue on in the selection process. If you are at the end of the line
try pressing equal the editor will show you your options. Entering ( also
works at times. 3. Click on oShp, right click, add watch, step into the sub
until your at oShp. In the watch window, click on the plus sign to the left
of oShp. This will give you a tree with all of the properties and values.

Hope this helps, if not I will try to keep quite.
Good luck,
Chuck
 
G

Guest

Chuck,

Thanks for the tips. They're all good, but unfortunately, I have already
tried them. There are no methods or properties that involve language,
spelling, proofing, or dictionaries. I should also mention that I'm using
PowerPoint 97. Someone else has told me that this version of VBA is somewhat
deficient, and that I might have to use 2000 or 2003 to find anything useful.

It's not absolutely necessary, I will just have to do without the spell
checker. Thanks again.

Steven
 
S

Steve Rindsberg

Steven Marzuola said:
I am working with several PowerPoint files that contain sections pasted in
from other documents. As a result, the presentation contains sections that
are formatted with English-US, Brazilian Portuguese, and one or two varieties
of Spanish.

I'm trying to write a VBA program that will change all of the text to either
No Proofing or to one of the languages I work with. But I'm having trouble.
My VBA Help doesn't say anything about proofing tools.

I did find this code fragment on the Internet, and I understand how it
works. Can I add something to the line marked with XXX? What would that be?

Start here instead:

Text is right to left, bullets appear on right of text
http://www.pptfaq.com/FAQ00797.htm

But instead of this:

If oSh.TextFrame.HasText Then
With oSh.TextFrame.TextRange.ParagraphFormat
.TextDirection = ppDirectionLeftToRight
End With
End If

Do:

If oSh.TextFrame.HasText Then
With oSh.TextFrame.TextRange
.LanguageID = msoLanguageIDAlbanian ' or whatever
End With
End If

As soon as you type the = after LanguageID, VBA will pop up a list of the
available language ID constants ... makes it simple to find the one you want.
 
G

Guest

Steve Rindsberg said:
If oSh.TextFrame.HasText Then
With oSh.TextFrame.TextRange
.LanguageID = msoLanguageIDAlbanian ' or whatever
End With
End If

As soon as you type the = after LanguageID, VBA will pop up a list of the
available language ID constants ... makes it simple to find the one you want.

Steve, thanks, but no joy. My VB doesn't like LanguageID. It's because I
have PowerPoint 97, which doesn't have any methods or properties that refer
to spelling, dictionaries, languages or proofing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top