Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / August 2006

Tip: Looking for answers? Try searching our database.

Pasting Text from Excel cell to Powerpoint Title Box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sukhin@gmail.com - 28 Aug 2006 14:41 GMT
I have some text in an Excel Worksheet that I need to transfer to a
slide title in powerpoint.

I am currently using the following code:

' Add Title Text to Slide
   ppNewSlide.Shapes.Placeholders(1).TextFrame.TextRange.Text = sTitle

sTitle is a variable that is populated from a cell in Excel ( sTitle =
NameRange.Value).

The problem I am having is that line breaks that I enter in the Excel
cell using Alt+enter do not carry over to the Powerpoint slide title.

Any help would be greatly appreciated.

Thanks,

Sukhin
Steve Rindsberg - 29 Aug 2006 17:47 GMT
> I have some text in an Excel Worksheet that I need to transfer to a
> slide title in powerpoint.
[quoted text clipped - 11 lines]
>
> Any help would be greatly appreciated.

I'm guessing that Excel embeds a special character in the text to indicate the
linebreak.  Use something like this to work out what it is:

For x = 1 to Len(ExcelText)
 Debug.Print Asc(Mid$(ExcelText,X,1))
Next

Then (assuming you use PPT2000 or higher) use this before assigning sTitle to
the text range:

sTitle = Replace(sTitle, ExcelLineBreakCharacter, Chr$(11))

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.