|
Congratulations!!
This is one good job!!!
I am using "Visual Studio 2005" and "Office XP 2003". I included one more 'DEFINE' in Office.h to cover this situation.
If you want to build this project in your machine, see into Office.h file and change the paths, for your OFFICE installation path.
This project is not works fine yet. Sometimes the application fail, and leave the Excel running in background.
Some one can help me to solve this problem?
P.S. If some one want this project updated for "Visual Studio 2005", send me one message by e-mail, that I answer with this project attached, i.e., If the Author issue me one authorization for to do this.
Thanks all.
Anderson Luís Oliveira e Silva
nosredna@terra.com.br
Anderson Luís Oliveira e Silva
nosredna@terra.com.br
|
|
|
|
|
How can I hide office menu and toolbar. If my computer intalls office other version, how can I check and inport accurate library.
Thanks
|
|
|
|
|
Is posible to insert an Excel Object in a Dialog Base App
|
|
|
|
|
hi
i am automating msword in MFC,
the speed too slow
i am setting header footer & creating table, most of the time is wasted while filling the table
|
|
|
|
|
Hello !
First thanks for sharing theses sources.
In my Application I use this class to store some, the registry has this type architecture (CASE SENSITIVE) :
HKEY_LOCAL_MACHINE
+ SOFTWARE
+ CompanyName
+ ApplicationName
+ Password
+ Peremption
+ Users
After setting defaults names and values (ex : "Password\\MaxLength") and Calling refresh contents I read what's in the map and I see "doublon" in Lower case ex :
"Password\MaxLength" and "passwordmaxlength"
The keys I add with "SetValueByname" (ex : "Users\Toto")are correctly added in registry but if I read them I get a wrong path (ex : "users\toto") since it is lower case.
Is this class only working with lower case key names ?
Thank For your response
************
Best Regards,
bizulk.
|
|
|
|
|
I've successfully implemented Print Preview in the MFC application by implementing IPrintPreviewCallback interface in the document class and quering server object for IInplacePrintPreview interface. I can post (or send) the solution somewhere if someone is interested.
I used Microsoft FramerEx sample (http://support.microsoft.com/kb/q268470/[^]) and description of the above interfaces (http://msdn.microsoft.com/library/default.asp?url=/archive/en-us/dnaro97ta/html/msdn_binder97.asp[^]) for reference.
Also I took main part of the MFC code implementing IInplacePrintPreview from http://www.codeguru.com/forum/archive/index.php/t-75806.html
[^].
The main problem that I currently have is crash after print preview is closed when using Office XP/2003, although it's working perfectly with Office 97/2000. Microsoft FramerEx example has the same problem.
I think it may be due to the fact that these interfaces have been developed for use with Microsoft Binder which is not included in OfficeXP/2003 and it's support is now limited (http://support.microsoft.com/?scid=kb;en-us;822622&spid=2525&sid=276[^]).
I have noticed that if another instance of MS Word is opened while print preview is active in my program, and I close print preview, my program does not crash, but that another MS word window is repositioned right above the main frame where my print preview was displayed. So I think maybe the server application "dies" when I close print preview (or IInplacePrintPreview::ExitPrintPreview is executed).
I'm now trying to find a workaround to this problem, maybe by launching hidden insance of MS Word or creating another "temporary document". I'm not sure if it will help, so have anyone experienced the same problem?
|
|
|
|
|
Is this someting you woe to share?
The part of implementing the printpreview in MFC?
/Magnus
Magnus
|
|
|
|
|
OK, basically I used the code found on this page to implement the Print Preview.
http://www.codeguru.com/forum/archive/index.php/t-75806.html
I can post the sample project somewhere if you suggest where I can post it.
I have no time for a long description now, but I can answer your questions if you have some.
The biggest problem that I faced after implementing the print preview is an inevitable crash in the application after the print preview window is closed if using Office XP/2003.
While investigating the problem, I have installed MS Binder application from MS Office 2000 (along with full Office 2003 installed). I did so because the interfaces to support Print Preview were initially designed for MS Binder, that has been removed from the latest versions of MS Office. I found the same problem with the Print Preview opened inside MS Binder.
Finally I found that the print preview works correctly if I uncheck the "Windows on Taskbar" option in MS Word settings (that was introduced starting from Office 2000). It seems to be a bug from MS, so I found no better solution than disabling this option programmatically by modifying registry value "Settings" under the following key:
HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Word\Data
|
|
|
|
|
Crulex:
I used the interface IInplacePrintPreview to show word print preview in my frame. I can make it preview, but the size of the preview window is not the same as the size of the main frame . I want to know your sollution.
Thank you very much!
|
|
|
|
|
Atleast source code or site name where i can get source code
pls help me! it is urgent
Hello friend work hard
|
|
|
|
|
I wanted to know how i can get the excel file open thru VC++ form and automate the excel file.... Urgent..
tell me very urgent
|
|
|
|
|
|
I have an activeX written in VC++. I have trouble accrssing the methods!
Say for example I have a method void ABC() in my activeX and I am calling this In my Excel program as follows
myObject.ABC()
For some reason it doesn't seem to work. Call to properties work fine.
Can someone help??
Thanks
|
|
|
|
|
I have compiled the program by vs2003, but it throw exception when enter AfxWinMain, pointer to CWinThread and pointer to CWinApp are NULL.
Folowing is output information.
'XOffice.exe': Loaded 'D:\test\xoffice_src\Debug\XOffice.exe', Symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\mfc71d.dll', Symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\msvcr71d.dll', Symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\lpk.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\usp10.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\MFC71CHS.DLL', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\Downloaded Program Files\CnsMin.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\netapi32.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\clbcatq.dll', No symbols loaded.
'XOffice.exe': Loaded 'C:\WINDOWS\system32\comres.dll', No symbols loaded.
First-chance exception at 0x7c235a5f (mfc71d.dll) in XOffice.exe: 0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x7c235a5f (mfc71d.dll) in XOffice.exe: 0xC0000005: Access violation reading location 0x00000000.
Any idea?
|
|
|
|
|
|
Hello!
Have you found a solution?
Thanks in advance.
Jordi B.
www.teracat.com
|
|
|
|
|
Add the following line to one of .cpp files (for instance, XOffice.cpp):
CComObjectGlobal<cxofficeapp> theApp;
|
|
|
|
|
Hi,
I notice that if I have Excel running, your application will attach to that instance of Excel. If Excel is not running, it will launch it and attach to it. Is there a way to create a new instance of Excel even if I already have one instance running? The reason I want to do this is because if the user kills or closes the Excel they originally initiated, the Excel worksheet in the application goes with it. If the Excel worksheet in my application had a dedicated Excel process, this problem would be eliminated.
Thanks much for your help.
Roshan
|
|
|
|
|
:|Could you please Help me ? I want to read data from ms office documents. For instance, i would like
to extract text and images (pictures) from a word documents using automation and C++ or VC++.
If you could tell what structures should i use, and header files.
Thanks for you
PS : you could send me your explanation to my e-mai : hoan_vacnew@yahoo.com
|
|
|
|
|
Can someone explain the above thread to me? I working on this case too.
Thanks.
|
|
|
|
|
I get the compiling, I get the following errors.
I am using Office2000, any idea?
Thanks in advanced.
c:\projects\myprojects\xoffice\debug\msword9.tlh(3719) : error C2146: syntax error : missing ';' before identifier 'VBE'
c:\projects\myprojects\xoffice\debug\msword9.tlh(3719) : error C2501: 'VBEPtr' : missing storage-class or type specifiers
c:\projects\myprojects\xoffice\debug\msword9.tlh(3719) : error C2501: 'VBE' : missing storage-class or type specifiers
|
|
|
|
|
I get the same errors with you. who can tell me how to resolve this problem
das
|
|
|
|
|
Hi!
Its a nice artical but i jut couldnt test a few features coz i dont have Office 2000 installed and there are quite a lot of library name convention changes there in newer versions of office. So if u can help me out with it,
Thanks a lot,
Bilal Anjum
|
|
|
|
|
|
I tried this example for excel, but fail to save document. Can you pl tell me the method for saving of excel file with different extension and again open it for modification.
Pl reply urgently .
Neeraj
|
|
|
|