Click here to Skip to main content
15,912,932 members
Home / Discussions / C#
   

C#

 
Questionhow to define coclass in c# com object? Pin
iman_kh25-Jun-08 2:38
iman_kh25-Jun-08 2:38 
AnswerRe: how to define coclass in c# com object? Pin
Mohammad Dayyan25-Jun-08 10:51
Mohammad Dayyan25-Jun-08 10:51 
Questionapp.config Pin
arkiboys25-Jun-08 2:32
arkiboys25-Jun-08 2:32 
AnswerRe: app.config Pin
SteveNY25-Jun-08 3:39
SteveNY25-Jun-08 3:39 
GeneralRe: app.config Pin
arkiboys25-Jun-08 3:46
arkiboys25-Jun-08 3:46 
GeneralRe: app.config Pin
Ashfield25-Jun-08 3:52
Ashfield25-Jun-08 3:52 
AnswerRe: app.config Pin
Marek Grzenkowicz25-Jun-08 3:46
Marek Grzenkowicz25-Jun-08 3:46 
QuestionHow Power Point slides picture can be tranfer to word document picture one by one. Pin
haroon_calculus25-Jun-08 1:52
haroon_calculus25-Jun-08 1:52 
I have taken refences
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Word = Microsoft.Office.Interop.Word;

and some code
public class PptToWord
{

PowerPoint.Application objApp;
PowerPoint.Presentations objPresSet;
PowerPoint._Presentation objPres;
PowerPoint.Slides objSlides;

public void CreateFile(StringCollection array)
{
String strTemplate;
strTemplate = "C:\\TFSPRESENTATION.ppt";

try
{
//Create a new presentation based on a template.
objApp = new PowerPoint.Application();
objPresSet = objApp.Presentations;
objApp.Visible = MsoTriState.msoTrue;
objPres = objPresSet.Open(strTemplate,MsoTriState.msoFalse , MsoTriState.msoTrue, MsoTriState.msoTrue);
objSlides = objPres.Slides;

// word doc
object oMissing = System.Reflection.Missing.Value;
Word._Application oWord;
Word._Document oDoc;

oWord = new Word.Application();
oWord.Visible = true;
oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,ref oMissing, ref oMissing);

//oWord.ActiveDocument.InlineShapes.AddPicture();

foreach(PowerPoint._Slide slide in objSlides)
{
foreach(PowerPoint.Shape Slideshape in slide.Shapes)
{
if (Microsoft.Office.Core.MsoTriState.msoTrue == Slideshape.HasTextFrame)
{
if (Microsoft.Office.Core.MsoTriState.msoTrue == Slideshape.TextFrame.HasText)
{
//MessageBox.Show(Slideshape.TextFrame.TextRange.Text);
Word.Paragraph oPara1;
oPara1 = oDoc.Content.Paragraphs.Add(ref oMissing);
oPara1.Range.Text = Slideshape.TextFrame.TextRange.Text;
oPara1.Range.Font.Bold = 1;
oPara1.Format.SpaceAfter = 24; //24 pt spacing after paragraph.
oPara1.Range.InsertParagraphAfter();

}
}
if(Microsoft.Office.Core.MsoShapeType.msoPicture==Slideshape.Type)//for image
{

//Word.Shape oPicture;
// oPicture = (Word.Shape)Slideshape
// I am facing problem here, as i m not able to directly transfer pictures from power point slides to word document pictures.
// I dont want to save images on temprory location to my system hard disk. Can anyone guide me to do the same.

}

}
}
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}




}
}
Can any one guide me.
Thanks and Regards
Haroon(SolnTryst)

Haroon(SolnTryst)

QuestionAdd a control in Visual Studio 2008 IDE? Pin
Harvey Saayman25-Jun-08 1:39
Harvey Saayman25-Jun-08 1:39 
AnswerRe: Add a control in Visual Studio 2008 IDE? Pin
Christian Graus25-Jun-08 1:43
protectorChristian Graus25-Jun-08 1:43 
GeneralRe: Add a control in Visual Studio 2008 IDE? Pin
Harvey Saayman25-Jun-08 1:57
Harvey Saayman25-Jun-08 1:57 
GeneralRe: Add a control in Visual Studio 2008 IDE? Pin
leppie25-Jun-08 2:02
leppie25-Jun-08 2:02 
GeneralRe: Add a control in Visual Studio 2008 IDE? Pin
Harvey Saayman25-Jun-08 2:09
Harvey Saayman25-Jun-08 2:09 
GeneralRe: Add a control in Visual Studio 2008 IDE? Pin
leppie25-Jun-08 2:12
leppie25-Jun-08 2:12 
QuestionMultithreading program! Pin
TaiZhong25-Jun-08 1:17
TaiZhong25-Jun-08 1:17 
AnswerRe: Multithreading program! Pin
Ashfield25-Jun-08 1:30
Ashfield25-Jun-08 1:30 
GeneralRe: Multithreading program! Pin
TaiZhong25-Jun-08 1:57
TaiZhong25-Jun-08 1:57 
GeneralRe: Multithreading program! Pin
leppie25-Jun-08 2:06
leppie25-Jun-08 2:06 
GeneralRe: Multithreading program! Pin
TaiZhong25-Jun-08 3:37
TaiZhong25-Jun-08 3:37 
GeneralRe: Multithreading program! Pin
SteveNY25-Jun-08 3:48
SteveNY25-Jun-08 3:48 
GeneralRe: Multithreading program! Pin
TaiZhong25-Jun-08 5:44
TaiZhong25-Jun-08 5:44 
Questioncystal report Pin
cse.vidhya25-Jun-08 0:57
cse.vidhya25-Jun-08 0:57 
AnswerRe: cystal report Pin
Christian Graus25-Jun-08 1:36
protectorChristian Graus25-Jun-08 1:36 
AnswerRe: cystal report Pin
leppie25-Jun-08 2:03
leppie25-Jun-08 2:03 
AnswerRe: cystal report Pin
Verghese25-Jun-08 3:21
Verghese25-Jun-08 3:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.