• Paste Unformat Macro (PPT 2k SR-2)

    Author
    Topic
    #357821

    I need to make a macro to do EDIT, PASTE SPECIAL, then UNFORMATTED TEXT. It pretends to record, but nothing gets recorded. Tried both mouse and keyboard. Grrrrr. This worked fine in Word. Help!

    Viewing 1 reply thread
    Author
    Replies
    • #532481

      hmmn I get the same result (PPT2K SR-1, 9.0.3821)
      Wierd.
      I get the framework of the macro (sub…endsub) but no content.
      Can’t help as to why, though.
      To get you going, you could copy the macro from word and paste it into the PPT macro while other loungers sort out why it won’t record properly.

      • #532520

        Tried that! The PPT de###### objected to every element of the macro. Where is this cross application consistency that MS promises….

    • #532502

      It’s even worse. There is no paste spacial in the PowerPoint object model! See Q222721 for an ugly work around. HTH! –Sam

      • #532523

        OK. Thanks. Tried that, with both Word and PPT running (which is what I would always have going on to need the PasteSpecial, and their workaround doesn’t work. I get a run error at DataType:=wdPasteEnhancedMetafile

        They have a comment in their code saying pasting of text doesn’t work. ARG. That is the ONLY reason I would be doing this! Anyone have any cludge workarounds for this?

        I want to take Word text and copy it into a specific PPT slide, and take on the existing PPT slide formatting and fonts, etc. A simple paste forces an Arial Unicode font, which messes up a bunch of stuff down the road.

        • #532553

          That’s beyond ARG! Sorry I didn’t notice “Text does not support pasting .” IEEEEE! hairout I’ll try to figure out a workaround. Should be something like ??.InsertAfter=Clipboard.GetText(), but PowerPoint doesn’t seem to know about the Clipboard object. I’ll have to go to another (real) computer. Figures that MS wouldn’t give us the fix that we really need.

          • #532580

            Oh pleasepleaseplease come up with a solution… I continue to mess around with it on my end, but PPT seems to be crippled in regards to VB. Hey, I would promote the heck out of the macro that you come up with as a marketing tool for you/your org…. bow

            • #532595

              This is a wee bit ugly (my daughter hates the error message), and it dosn’t replace selected text, and it needs more error checking (what if a picture is on the clipboard), but here it is: I’ll make it better tomorrow, so ask more questions if there is something that you don’t like. — Sam

              Option Explicit
              Sub pasteSpecialText()
              Dim tmpSlide As Slide
              Dim tmpBox As Shape
                  If ActiveWindow.Selection.Type  ppSelectionText Then
                      MsgBox "Please activate the insertion point"
                      Exit Sub
                  End If
                  Set tmpSlide = ActivePresentation.Slides.Add(Index:=1, Layout:=ppLayoutBlank)
                  Set tmpBox = tmpSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 48, 36, 642, 36)
                  tmpBox.TextFrame.TextRange.Paste
                  ActiveWindow.Selection.TextRange.InsertAfter tmpBox.TextFrame.TextRange.Text
                  tmpSlide.Delete
                  Set tmpSlide = Nothing
                  Set tmpBox = Nothing
              End Sub
              
            • #532600

              Wow!!! Way cool. cool It works perfectly. I was worried at first, because the less-than and the greater-than got translated in the e-mail version of your message into odd symbols, but the website version showed me what to change. Odd that you can’t copy/paste off the website page (no line breaks carry over). Thanks muchly! Seriously, you should promote the darn thing…I can’t imagine I’m the only person wanting this capability. bravo

            • #532618

              RE: copy/paste; You’re right.

              Work around: Copy from the web screen, open word pad, paste. Copy text from Word pad and paste into VBA screen.

            • #860293

              I’m another happy lounger who has benefited from this code! bananas

              (8/5/2004)

              SammyB is the man !!!!

            • #860294

              I’m another happy lounger who has benefited from this code! bananas

              (8/5/2004)

              SammyB is the man !!!!

    Viewing 1 reply thread
    Reply To: Paste Unformat Macro (PPT 2k SR-2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: