WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

VBA - SlideIndex

 
   Home -> Office -> General Discussions RSS
Next:  Retrieve meeting date and time  
Author Message
George

External


Since: Feb 12, 2008
Posts: 19



(Msg. 1) Posted: Thu Sep 04, 2008 12:08 pm
Post subject: VBA - SlideIndex
Archived from groups: microsoft>public>powerpoint (more info?)

Hi

When I add a slide using VBA I have
to know the SlideIndex (+1) to define,
where the new slide has to be inserted.

When a user positions the cursor between
two slides I get a runtime error on the line
x = ActiveWindow.Selection.SlideRange.SlideIndex

How can I get the position, where a
new slide can be inserted in this case?

Many thanks for help.

Best Regards, George
Back to top
Login to vote
John Wilson

External


Since: Jul 08, 2006
Posts: 3975



(Msg. 2) Posted: Thu Sep 04, 2008 12:08 pm
Post subject: RE: VBA - SlideIndex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Basically you need to check for no selection (.Type=ppSectionNone) and then
switch viewtype to something else and then back. The slide before the cursor
will now be selected and your code will work

Shyam explains a similar problem in Sorter view here
http://skp.mvps.org/pptxp020.htm
--
Amazing PPT Hints, Tips and Tutorials

http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
_______________________________

We''re at PPTLive - see you there?
www.pptlive.com


"George" wrote:

> Hi
>
> When I add a slide using VBA I have
> to know the SlideIndex (+1) to define,
> where the new slide has to be inserted.
>
> When a user positions the cursor between
> two slides I get a runtime error on the line
> x = ActiveWindow.Selection.SlideRange.SlideIndex
>
> How can I get the position, where a
> new slide can be inserted in this case?
>
> Many thanks for help.
>
> Best Regards, George
>
Back to top
Login to vote
George

External


Since: Feb 12, 2008
Posts: 19



(Msg. 3) Posted: Thu Sep 04, 2008 2:42 pm
Post subject: Re: VBA - SlideIndex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dear John

Many thanks. This solved my problem!

Best Regards, George


"John Wilson" <john AT technologytrish.co DOT uk> schrieb im Newsbeitrag
news:189BB5A1-05B3-4ED6-8BAD-988D2D9E62C0@microsoft.com...
> Basically you need to check for no selection (.Type=ppSectionNone) and
> then
> switch viewtype to something else and then back. The slide before the
> cursor
> will now be selected and your code will work
>
> Shyam explains a similar problem in Sorter view here
> http://skp.mvps.org/pptxp020.htm
> --
> Amazing PPT Hints, Tips and Tutorials
>
> http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
> _______________________________
>
> We''re at PPTLive - see you there?
> www.pptlive.com
>
>
> "George" wrote:
>
>> Hi
>>
>> When I add a slide using VBA I have
>> to know the SlideIndex (+1) to define,
>> where the new slide has to be inserted.
>>
>> When a user positions the cursor between
>> two slides I get a runtime error on the line
>> x = ActiveWindow.Selection.SlideRange.SlideIndex
>>
>> How can I get the position, where a
>> new slide can be inserted in this case?
>>
>> Many thanks for help.
>>
>> Best Regards, George
>>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET