Thank you for your patients and knowledge. Here is what I have so far:
Public Function PPTInsertNewSlide(ByVal fileName As String, ByVal position
As _
Integer, ByVal title As String) As Boolean
Dim returnValue As Boolean = False
Dim documentPart As PackagePart = Nothing
Using pptPackage As Package = Package.Open(fileName, FileMode.Open,_
FileAccess.ReadWrite)
' Get the main document part (presentation.xml).
For Each relationship As PackageRelationship In _
pptPackage.GetRelationshipsByType(documentRelationshipType)
Dim documentUri As Uri = PackUriHelper.ResolvePartUri(New
Uri("/",_
UriKind.Relative), relationship.TargetUri)
documentPart = pptPackage.GetPart(documentUri)
Dim part As SlideLayoutPart
If documentUri <> Nothing Then
'Insert the new slide and name it.
Dim newSlide As SlidePart
documentPart.CreateRelationship(newSlide.Uri,
TargetMode.Internal,_
slideRelationshipType)
newSlide.AddPart(part, fileName)
End If
' There is only one document.
Exit For
Next
End Using
Return returnValue
End Function
I am not sure what ti initialize the part and newSlide to. By the way is
there a good site or book I can get my hands on so that I can bug experts
like yourself less and maybe contirbute knoledge to others that need it?
Again thank you very much. =-)
--
SSgt James J. Cassidy
Computer Systems Software Engineer USAF
DSN 276-1541 ext. 3512
Commercial 805-606-1541 ext. 3512