|
-
June 26th, 2009, 06:53 AM
#1
[RESOLVED] Pragmas for different Progam Compilation ?
Hi friends !
I have made a pogram which runs using office 2003 (word and Excel) mostly but I need to do an additional one for Office 2000 which only will be a few copies.
The amount of methods that change are more o less the opening and closing methods as well as the Save methods.
In the moment I have done two different .cs files one which contains all the office methods for Office 2000 and one which contains the same for office 2000. This are basically two classes which do the word and excel data exchange, so I have two vesions of that classes. all the other program code is the same in both versions. In the moment this are two diffeent PC's one with office 2000 installed and one with office 2003 installed and all what is done in one of the programs needs to be done on the other too.
So I would like to have a vesion whee I can have both office versions in my code and simple setting a pragma which allows me to switch between 'using Excel' and 'using Microsoft.Office.Interrop.Excel' ( and the same for word )
and the code which is different.
Also the question is, if it would be possible to have a sort of pragma depending references sections so I would be able to only set the pragma and would get my Office 2000 version and if PragmaConstant isn't set it would compile fo Office 2003
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|