I have the same exact question as Josep in this thread: http://bytes.com/forum/thread272940.ht ml except when I try and compile the program I get a few errors (6 of them to be exact)
They are as follows.
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(129 ,45): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'Microsoft.Offi ce' (are you missing an assembly reference?)
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(134 ,13): error CS0103: The name 'objPres' does not exist in the current context
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(134 ,48): error CS0103: The name 'MsoTriState' does not exist in the current context
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(135 ,13): error CS0103: The name 'MsoTriState' does not exist in the current context
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(135 ,34): error CS0103: The name 'MsoTriState' does not exist in the current context
Now, please take in mind that I am still learning C# and know a little bit about C++, so I will be able to get some of it but I might need a more dumbed down version.
Also, since this code is not exactly something I want to post right up on the board, if you think you can help me please let me know. :)
-Tom
EDIT: Here's the snippet of code that I copy pasted from the old thread ![](/images/imgserve.php?url=http://img215.imageshack.us/img215/2439/code1ch9.jpg) 13 10413
perhaps google.com help you greatly in your situation..."ty pe in how to open a powerpoint in c#"
joedeene
perhaps google.com help you greatly in your situation..."ty pe in how to open a powerpoint in c#"
joedeene
Nope, it doesn't.. Leads me back to here, and other sites that link to that old thread.
I need help with the errors that it's giving me. :(
Nope, it doesn't.. Leads me back to here, and other sites that link to that old thread.
I need help with the errors that it's giving me. :(
try exploring areas of this MSDN site. or looking up tutorials on the Powerpoint.Appl ication class?
joedeene
Well, first off, I'm not using Visual Basic, second of all, I don't even think you looked over these errors.. I may be a beginner, but I know this is a step in the wrong direction... I appreciate that you're trying to help, but do you even know how to do this..?
EDIT: I do not have a Microsoft.Offic e.Core reference.. Bleh, let me see if I can't fix that.
I think you may need to add a reference to Microsoft.Offic e.Core, but I can't be sure, since I don't have Visual Studio in front of me right now.
See if you can do that and let me know.
Edit, seems like you beat me to the punch. Let us know how it goes.
Now, let's try to keep it polite, fellas. joedeene is trying to help, and if the help isn't working, just say it didn't work and ask for more help. OK?
Mod.
I think you may need to add a reference to Microsoft.Offic e.Core, but I can't be sure, since I don't have Visual Studio in front of me right now.
See if you can do that and let me know.
Edit, seems like you beat me to the punch. Let us know how it goes.
Now, let's try to keep it polite, fellas. joedeene is trying to help, and if the help isn't working, just say it didn't work and ask for more help. OK?
Mod.
Sorry, I've been working on this for a week and since I've hit this brick wall my boss has been heckling me.. Well, I'm sure how you all know how it goes. :/
I apologize.
And yes, I got the office core file in there now but instead of giving me the whole core not being there I get:
C:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\Form1.cs(130 ,28): error CS0029: Cannot implicitly convert type 'Microsoft.Offi ce.Core.MsoTriS tate [c:\Documents and Settings\Tom\De sktop\Work\High School US\HighSchool US\HighSchool US\obj\Debug\In terop.Microsoft .Office.Core.dl l]' to 'Microsoft.Offi ce.Core.MsoTriS tate []'
Man.. that's a doozy.
I'm reading up on error CS0029 right now, but here is the offending line of code:
oPPT.Visible = Microsoft.Offic e.Core.MsoTriSt ate.msoTrue;
EDIT:
I'm reading up here: http://msdn.microsoft.com/en-us/libr...x5(VS.71).aspx but... their examples are way more simple than the ones that I've got going on here, and well.. I'm lost again. xD
That's really wierd...it's expecting an explicit cast, but it seems to be the same datatype. Try explicitly casting it anyway.
Put the datatype in parenthesis behind it, or right after it say "as <datatype>" replacing <datatype> with whatever it was.
Interop is always a pain, IMHO.
I've started to figure that out. :/
Now I've got "The as operator must be used with a reference type or a nullable type (Microsoft.Offi ce.Core.MsoTriS tate is a non nullable value type)"
Bleh.
This is what I've got in the code right now on that line that's causing the error:
oPPT.Visible = Microsoft.Offic e.Core.MsoTriSt ate.msoTrue as Microsoft.Offic e.Core.MsoTriSt ate;
Also: I tried oPPT.Visible = Microsoft.Offic e.Core.MsoTriSt ate.msoTrue as <Microsoft.Offi ce.Core.MsoTriS tate>;
just for the heck of it, and that didn't work either.
):
EDIT:
error CS0012: The type 'Microsoft.Offi ce.Core.MsoTriS tate' is defined in an assembly that is not referenced. You must add a reference to assembly 'office, Version=11.0.0. 0, Culture=neutral , PublicKeyToken= 71e9bce111e9429 c'.
the oPPT.Visible on that same line gives me this error code as well, do you think that the fact that PowerPoint.Appl icationClass() does not have a Visible class?
OK, I read something weird on the internet, but it's worth a shot. Try removing the reference to Powerpoint, and then adding it again. Then see if it builds.
Also try the explicit cast like this: -
oPPT.Visible = (Microsoft.Office.Core.MsoTriState)Microsoft.Office.Core.MsoTriState.msoTrue;
There shouldn't be space in there, so just ignore it.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Levi |
last post by:
How can I use php and mysql to create a downloadable .ppt file from
the php-made output?
|
by: WillRead |
last post by:
I have a VB.Net application and a PowerPoint presentation explaining how each
form in the application works, etc.. I would like to select and display the
slide appropriate for each form by pressing the F1 key. In other words, I
want to use the powerpoint presentation for my help system. I am calling the
SlideShow from the applications menu, and it works great; however, the same
techniques are not working for selecting individual slides.
...
|
by: Joseph |
last post by:
I am trying to open a 3 powerpoint presentation simultaneously afte
each other without interruption, the operator of the application doe
not need to notice anything or interfere in the operation of th
transition between the 3 presentations.
Let us say I have three powerpoint presentation Presentation 1
Presentation 2, and Presentation 3.
I like to fire them from a window form on the click event of a butto
on the form. The sequence of...
|
by: Alexander Czernay |
last post by:
I created a VB.NET-PowerPoint-AddIn as described in the VisualStudio
2003 documentation. That works very well.
The AddIn adds a new toolbar to PowerPoint if the active document is
based on a certain master. So I had to catch all events that notify a
change of the active presentation.
For that, I made two approaches:
1. A method that handles the apropriate events directly via HANDLES:
|
by: Sensei76 |
last post by:
Hello, I have the following problem and I do not know how to accomplish this.
I have an (existing) powerpoint presentation that should be displayed not
within its own window, but within a control of my own form.
So I added a reference to the Microsoft PowerPoint Object Library and tried
to run a slideshow of the presentation. For this I am using those classes
like PowerPoint.Application, PowerPoint.Presentation, PowerPoint.Slides, ......
| |
by: PaulJMiddleton |
last post by:
I'm in the middle of writing an application to display a scrolling marquee and a PowerPoint presentaion on multiple monitors. Powerpoint is unable to display more than one presentaion on one PC so I'm resorting to doing it myself.
I can convert the PowerPoint file to HTML and show the presentation in a form this way, however the conversion process makes a mess of some of the more complex slides.
So, is it possible to show a powerpoint...
|
by: BWPanda |
last post by:
Hi everyone,
I'm wanting to use VB.NET to display a powerpoint presentation, much the same
way as the presenter that comes with PowerPoint (when used on multiple
monitors).
Basically, I want to show the presentation in one form/window, and in the other,
have controls for moving through the presentation, list of slides, etc.
I don't really want code as such, more like a tutorial on how to do something
like this.
|
by: WPeterson |
last post by:
Converting PowerPoint to Flash would absolutely be a good choice to distribute your bulky PowerPoint presentations.
You can do the whole PowerPoint to Flash conversion manually or with professional applications.
First, you'll need to prepare the PowerPoint files. Make sure you are not using any complicated gradients or animations. These will be interpreted poorly when they are brought into Flash. Also, make sure there are no objects that...
|
by: dotnets8n |
last post by:
Good day!
I have such problem.
I must play the PowerPoint presentation in my application. Several ActiveX components (f.e. EDraw Office Viewer) can do that but if the MS Office is not installed, they become useful.
So, I need a way to view the PPT/PPS file without Office installed.
The only application that can do this is MS PowerPoint Viewer (I`ve found only it at this time). But it doesn`t install/register any OCX that I can use in my...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |