|
Hello,
The URL presented in the article for Nick Hodapp's article is incorrect and the correct URL is:
http://www.codeguru.com/atl/AutoATL.shtml[^]
Rgds,
Nirav
---------------------------------------------------
* Don't wish it was easier; Wish you were better! *
---------------------------------------------------
|
|
|
|
|
In office.h you commented out the line
#import "C:\Program Files\Microsoft Office\Office\MSACC9.OLB"
If it is uncommented you get
error C2501: '_ConnectionPtr' : missing storage-class or type specifiers
Is there a workaround?
Malcolm Drake
|
|
|
|
|
I want to open a file delimited with ',' using excel from my sdi application on BN_CLICKED.
Can anybody help me with this problem, please send me the source code.
Thanking You & Regards,
Sridevi Palepu
|
|
|
|
|
The easiest way is to use ShellExecute or CreateProcess. If .csv file is associated with Excel on your system, use ShellExecute and use "open" as the verb. Otherwise, use CreateProcess with Excel executable will do.
|
|
|
|
|
I was able to remove the formula bar and the Grid headings with the following code.
app.SetDisplayFormulaBar(FALSE);
Window win = app.GetActiveWindow();
win.SetDisplayHeadings(FALSE);
I still want to remove the "Formatting Toolbar" and all of the menus associated with Excel.
Anyideas.
Classes of interest are --> Menu, MenuBar, MenuBars, MenuItem, MenuItems, Menus, Toolbar, ToolbarButton, ToolbarButtons, Toolbars
Sincerely,
Mardigin
Sincerely,
Mardigin
|
|
|
|
|
open an xl file, write vb macros, save the xl file and then run the macro from u'r code.
|
|
|
|
|
The, Using ATL to Automate a MFC Application, link is dead. Does anyone know if this article is still accessable somewhere?
http://codeguru.developer.com/atl/AutoATL.shtml
Sincerely,
Mardigin
|
|
|
|
|
Is there a way to make Word document Read-Only so users cannot select and edit the file.
|
|
|
|
|
with office xp you can give a document a read-only protection:
<br />
pDoc->Protect(Word::wdAllowOnlyReading, &_variant_t(true), &_variant_t(_T("pwd")));<br />
--
klaus triendl
|
|
|
|
|
You can set restrict editing in the review menu, and set protection. Thus, without the code, the document is read-only to others. If you upload this to the internet, it will remain its protection state.
|
|
|
|
|
Error in compiling _CommandBarsPtr. Please help.
Thanks.
|
|
|
|
|
the main prob. is conflct on dll
if you see the vbeext1.tlh
// Created by Microsoft (R) C/C++ Compiler Version 12.00.9782.0 (c17e314b).
//
// f:\bin\worxapp\inventoryworx\release\vbeext1.tlh
//
// C++ source equivalent of Win32 type library C:\Program Files\Common Files\Microsoft Shared\VBA\vbeext1.olb
// compiler-generated file created 03/21/05 at 01:27:04 - DO NOT EDIT!
//
// Cross-referenced type libraries:
//
// #import "D:\Program Files\Common Files\Microsoft Shared\Office10\MSO.DLL" <==== { ****** this is the prob **** }.
//
you import ronge dll
if you install dual Office97 & Office Xp Or Office 2000 make this error
thanks...
|
|
|
|
|
I use the example to display an exel-workbook.
But I dont want to display the Exel-toolbars and the Excel-Menu. User should only use my Exel-sheet's but they are not allowed to manipulate them. So they need no toolbars and no menue's - except print and printpreview.
What can I do to prevent the display from toolbars and exel-menu ???
Thank's Grisu
|
|
|
|
|
the following code disables all toolbars:
<br />
Excel::_WorkbookPtr pBook;
Office::_CommandBarsPtr pBars = pBook->CommandBars;<br />
for (int i = 1; i <= pBars->Count; ++i)<br />
{<br />
Office::CommandBarPtr pBar = pBars->GetItem(i);<br />
if (pBar->Type == Office::msoBarTypeNormal)<br />
{<br />
pBar->Visible = _variant_t(false);<br />
pBar->Enabled = _variant_t(false);<br />
}<br />
}<br />
--
klaus triendl
|
|
|
|
|
Hi,
I need to open (or create) a MS Word Doc file from my application. The problem is that I donot know how to add some data, such as text and image, to this DOC file through my application. I have installed MS Office on my PC. More specifically, I wanna make my application based on dialog box mode but not doc view. How do I code such an application?
Could anybody help me out and send me the sourcecode if you have.
Please email to james2hou@hotmail.com .
Thanks a lot!
yours
James Hou
|
|
|
|
|
for example:
an activeX control, it has word's menubar toolbar and client area!
and the control has a function "LoadWordFile(CString str)" to load
the doc file! Then i can edit this doc file in this control!
|
|
|
|
|
D:\MFC\xoffice_src\CntrItem.cpp(249) : error C2039: '_WorkbookPtr' : is not a member of 'Excel'
D:\MFC\xoffice_src\CntrItem.cpp(249) : error C2065: '_WorkbookPtr' : undeclared identifier
D:\MFC\xoffice_src\CntrItem.cpp(249) : error C2146: syntax error : missing ';' before identifier 'book'
Any ideas?
Using OfficeXP:
#ifdef Uses_MSOXP
// for MS Office XP
#import "C:\Programme\Gemeinsame Dateien\Microsoft Shared\Office10\MSO.DLL"
#import "C:\Programme\Gemeinsame Dateien\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB"
#import "D:\Programme\Microsoft Office\Office10\MSWORD.OLB" \
rename("ExitWindows","_ExitWindows")
#import "D:\Programme\Microsoft Office\Office10\XL5EN32.OLB" \
rename("DialogBox","_DialogBox") \
rename("RGB","_RGB") \
exclude("IFont","IPicture")
#endif
|
|
|
|
|
If you move another application window (like notepad) on top of the active server(excel or word or any automation server) when contained in a automation container,
the server does not repaint properly.
I think this may be bug in the automation frame work.
The same repainting problem occurs in the MFC sample (MFCBind) which is an active document container.
I appreciate your help, if you have any solution for this issue.
Thanks,
Venu
|
|
|
|
|
I have an MDI application which creates new officedocument sheets as its documents. I don't want the menu and toolbar from them ,how can i do that?
best regards!
hi
|
|
|
|
|
When I open a word document containing hyperlinks to bookmarks within the document, and click on them, the control jumps to the bookmark, and the Web Toolbar shows up. However, the 'Back' button is disabled. Is there any way by which it can be enabled from your sample application.
|
|
|
|
|
Nick's article isn't there. The link is dead. How can I do step 2?
|
|
|
|
|
I believe the correct link for this article is:
http://www.codeguru.com/atl/AutoATL.shtml
Hope this helps
|
|
|
|
|
Hello Everybdy,
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 : ldafiri@hotmail.com
|
|
|
|
|
How can i let my application (MFC based), behave as Word. In embedding VBA (Visual Basic for application) inside my Process?
Or how Can i do something like that:
Dim VBAObject as object
VBAObject = CreateObject("VBA")
Nader
modified 3-Nov-17 12:11pm.
|
|
|
|
|
sir,
your artical is very useful,but please mention the way
to add/use paint in MFC application .
It is very urgent to me.
Hemant
|
|
|
|