A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

TextFrame and VBA



 
 
Thread Tools Display Modes
  #21  
Old January 19th, 2005, 11:23 AM
Jeff Jones
external usenet poster
 
Posts: n/a
Default

ROTFL --- Unfortunately, I believe that you are correct about the
apps pushing. I don't think that developers, during initial unit
testing, really test their apps to break them. I suspect that they
test them to work. I think that they start with a set of
requirements, develop something to "satisfy" them, and then only test
the ability of the app to meet those requirements. They really ought
to spend time trying to figure out every possible way to do something
wrong. In other words, they need to act like a user who hasn't a
clue. This will open up the areas that need be plugged in terms of
unexpected features. Oh well......

Now, lets talk about COBOL....... (shows my age, huh? LOL )

On Tue, 18 Jan 2005 20:31:58 EST, Steve Rindsberg
wrote:

In article , Jeff Jones wrote:
I put together some code that deletes the last slide and copies the
only slide from my blank.pot file into the presentation I'm working
on. That seems to solve the problem, at least until the next problem.
giggle I'll try the HTML toggle to test the integrity of the slide.
I have observed that we get unexpected features for some of microsoft
apps


Aw shoot. Push any app from anybody hard and you'll get unexpected features. ;-)

and wouldn't be surprised that PowerPoint has its own.


Not PowerPoint, naw, nope nuh-uh, never. ROFL!

I'll let you know what happens with the HTML toggle tomorrow morning.
I have a healthy group of stuff to catch up on. Sigh......

The batteries are charging as my phabulous phlying phlanges dance over
the keys......

Take care,
Jeff


  #22  
Old January 19th, 2005, 12:52 PM
Jeff Jones
external usenet poster
 
Posts: n/a
Default

Streve,

I believe that, at least until I find the need, I can declare victory
with the following code.


Sub TestShapes()

Dim numShapes, numAutoShapes, i As Long
Dim oSld As Slide
Dim oTxtRange As TextRange
Dim varTextFrame As Variant

On Error GoTo HandleError
Stop
StartAgain:
Set myDocument =
ActivePresentation.Slides(ActivePresentation.Slide s.Count)
With myDocument.Shapes
numShapes = .Count
If numShapes 1 Then
numTextShapes = 0
For i = 1 To numShapes - 1
If .Item(i).HasTextFrame Then
' If .Item(i).HasText Then
numTextShapes = numTextShapes + 1
varTextFrame = .Item(i).Name

ActiveWindow.View.GotoSlide
Index:=ActivePresentation.Slides.Count
Set oSld =
ActivePresentation.Slides(ActivePresentation.Slide s.Count)


ActiveWindow.Selection.SlideRange.Shapes(varTextFr ame).Select

Set oTxtRange =
oSld.Shapes(varTextFrame).TextFrame.TextRange

If Mid$(oTxtRange.Sentences(1), 1, Len("America"))
=
"America" Then
With oTxtRange.Sentences(1) _
.ActionSettings(ppMouseClick).Hyperlink
.Address = "http://www.gsms-am.eds.com/
http://www.gsms-am.eds.com/ "
.TextToDisplay = "Americas:
http://www.gsms-am.eds.com http://www.gsms-am.eds.com " & vbNewLine
.SubAddress = ""
End With

With oTxtRange.Sentences(2) _
.ActionSettings(ppMouseClick).Hyperlink
.Address = "http://www.gsms-ap.eds.com/
http://www.gsms-ap.eds.com/ "
.TextToDisplay = "Asia Pacific:
http://www.gsms-ap.eds.com http://www.gsms-ap.eds.com " & vbNewLine
.SubAddress = ""
End With
With oTxtRange.Sentences(3) _
.ActionSettings(ppMouseClick).Hyperlink
.Address = "http://www.gsms-ea.eds.com/
http://www.gsms-ea.eds.com/ "
.TextToDisplay = "Europe & Africa:
http://www.gsms-ea.eds.com http://www.gsms-ea.eds.com "
.SubAddress = ""
End With
End If
' Else
' DeletEmptyShapes
' End If
End If
NextFor:
Next
End If
End With

Exit Sub

HandleError:
'Stop
If Err.Number = 9 Then
GoTo NextFor
End If
' Resume

'If Err.Number 0 Then
' Msg = "Error # " & Str(Err.Number) & " was generated by " _
' & Err.Source & Chr(13) & Err.Description
' MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
'End If

CopyLastSlide
GoTo StartAgain

End Sub


Sub CopyLastSlide()
'
' Macro created 1/18/2005 by Jeff Jones
'
Windows.Item(Index:=2).Activate
ActiveWindow.ViewType = ppViewSlideSorter
ActiveWindow.Selection.Copy
ActiveWindow.ViewType = ppViewNormal
Windows.Item(Index:=2).Activate
ActiveWindow.View.Paste

ActiveWindow.ViewType = ppViewSlideSorter

ActivePresentation.Slides.Range(Array((ActivePrese ntation.Slides.Count
-
1))).Select
ActiveWindow.Selection.SlideRange.Delete
ActiveWindow.ViewType = ppViewNormal
ActiveWindow.View.GotoSlide Index:=ActivePresentation.Slides.Count

End Sub

I tried commenting out the SlideGoTo and the TextFrame selection but
ended up with errors I couldn't trap so I left them in. Oh well. I
tested against 33 of the 150+ presentations with no problems. I
suspect that I'll find other opportunities but for the most part, the
entire effort will be automated and therefore much preferable over
manually making the changes.

Thank you!

Take care,
Jeff


  #23  
Old January 19th, 2005, 04:11 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default

In other words, they need to act like a user who hasn't a
clue. This will open up the areas that need be plugged in terms of
unexpected features.


Too true. I make the same mistake all the time. Stuff works perfectly for me
because I do things the way *I* do them. Give the same code to another user who
holds their mouth a little differently when they doubleclick something and ...
ooopsie!

Now, lets talk about COBOL....... (shows my age, huh? LOL )


Awww bummer. I took the Fortran course instead of Cobol. Darn.



On Tue, 18 Jan 2005 20:31:58 EST, Steve Rindsberg
wrote:

In article , Jeff Jones wrote:
I put together some code that deletes the last slide and copies the
only slide from my blank.pot file into the presentation I'm working
on. That seems to solve the problem, at least until the next problem.
giggle I'll try the HTML toggle to test the integrity of the slide.
I have observed that we get unexpected features for some of microsoft
apps


Aw shoot. Push any app from anybody hard and you'll get unexpected features. ;-)

and wouldn't be surprised that PowerPoint has its own.


Not PowerPoint, naw, nope nuh-uh, never. ROFL!

I'll let you know what happens with the HTML toggle tomorrow morning.
I have a healthy group of stuff to catch up on. Sigh......

The batteries are charging as my phabulous phlying phlanges dance over
the keys......

Take care,
Jeff



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


  #24  
Old January 19th, 2005, 04:11 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default

The winnah and still champeen ....

Congrats!

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


  #25  
Old January 19th, 2005, 04:39 PM
Kathy J
external usenet poster
 
Posts: n/a
Default

Now, lets talk about COBOL....... (shows my age, huh? LOL )

Awww bummer. I took the Fortran course instead of Cobol. Darn.

Me, I took em both. I even had to take the Cobol one twice. (Long story, but
it was fun correcting the prof the second time through )

--
Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote
Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books
Get PowerPoint answers at http://www.powerpointanswers.com
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived


  #26  
Old January 19th, 2005, 04:58 PM
Jeff Jones
external usenet poster
 
Posts: n/a
Default

I can only declare victory because of your help!

It's too bad that you took the Fortran course. 'Course it coulda
been Assembler or some other somewhet useful language like AdPac or
Ramis.

Thnak you for your invaluable help!

On Wed, 19 Jan 2005 11:11:18 EST, Steve Rindsberg
wrote:

The winnah and still champeen ....

Congrats!

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
=============================================== =


  #27  
Old January 19th, 2005, 08:54 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default

Awww bummer. I took the Fortran course instead of Cobol. Darn.
Me, I took em both. I even had to take the Cobol one twice. (Long story, but
it was fun correcting the prof the second time through )


Cobol seemed SO longwinded. We had to enter everything onto punchcards; bad
enough in Fortran. I'd still be punching at it if I'd done Cobol!



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


  #28  
Old January 19th, 2005, 08:54 PM
Steve Rindsberg
external usenet poster
 
Posts: n/a
Default

In article , Jeff Jones wrote:
It's too bad that you took the Fortran course. 'Course it coulda
been Assembler or some other somewhet useful language like AdPac or
Ramis.


Hm. How about a language called Dissembler? Never gives the same answer twice
in a row.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


  #29  
Old January 19th, 2005, 11:53 PM
Jeff Jones
external usenet poster
 
Posts: n/a
Default

LOL. That actually sounds more like a politician running for an
election.....

On Wed, 19 Jan 2005 15:54:43 EST, Steve Rindsberg
wrote:

In article , Jeff Jones wrote:
It's too bad that you took the Fortran course. 'Course it coulda
been Assembler or some other somewhet useful language like AdPac or
Ramis.


Hm. How about a language called Dissembler? Never gives the same answer twice
in a row.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
=============================================== =


  #30  
Old January 20th, 2005, 12:13 AM
Kathy J
external usenet poster
 
Posts: n/a
Default

We were on punch cards. First time through, that was part of the problem.
Second time through, we had moved to a VAX and I was one of the few who
started the school year already knowing how to use the machine. COBOL was
long-winded. But it isn't as bad as, say, PL/1 or PL/C....

--
Kathryn Jacobs, Microsoft MVP PowerPoint and OneNote
Author of Kathy Jacobs on PowerPoint - Available now from Holy Macro! Books
Get PowerPoint answers at http://www.powerpointanswers.com
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived

"Steve Rindsberg" wrote in message
...
Awww bummer. I took the Fortran course instead of Cobol. Darn.

Me, I took em both. I even had to take the Cobol one twice. (Long story,
but
it was fun correcting the prof the second time through )


Cobol seemed SO longwinded. We had to enter everything onto punchcards;
bad
enough in Fortran. I'd still be punching at it if I'd done Cobol!



-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================




 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:33 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.