Saving Word doc back to Web Server
Http://www.theimagingsourceforums.com/showthread.php? T = 317081
Notes on automation of http://support.microsoft.com/kb/257757/ server Office
Http://msdn.microsoft.com/msdnmag/issues/06/11/BasicInstincts/default.aspx? Loc = ZH
Http://forums.microsoft.com/MSDN/ShowPost.aspx? Postid = 1174465 & siteid = 1
Http://blog.joycode.com/kaneboy/archive/2004/11/03/37889.aspx
Http://blog.csdn.net/whchen/archive/2006/12/15/1444177.aspx
Http://msdn.microsoft.com/msdnmag/issues/06/11/BasicInstincts/default.aspx? Loc = ZHGenerate Word 2007 documents on the server
Search DSO framer
Not foundWord Object Library 11.0 reinstall VS 2005
Use DSO framer OCX + Excel in B/S to solve complicated report problems
Http://www.cnblogs.com/Dragonpro/archive/2006/12/01/228144.html
Developing word application using C # & DSO framer
Http://bbs.hidotnet.com/712/ShowPost.aspx
EMBED Excel in your. Net Program 2-Use dsoframer
Http://caidehui.cnblogs.com/archive/2006/04/19/378782.html
Open, edit, and create office documents on the web pageFinally found
Http://blog.joycode.com/kaneboy/archive/2004/11/03/37889.aspx
Sample: framerex.exe is a container example of the MDI ActiveX document written in VisualC ++.
Http://support.microsoft.com/kb/268470/
Visual c ++ ActiveX Control for hosting office documents in Visual Basic or HTML
Http://support.microsoft.com/default.aspx? SCID = http://support.microsoft.com: 80/support/KB/articles/q311/7/65.asp& nowebcontent = 1 #
Use IFRAME
<IFRAME name = "fraread" frameborder = "0" Height = "300" width = "500" scrolling = "Auto" src = "1.doc"> </iframe>
C # operation Word Document (Office 2007) http://www.cnsdn.com.cn/blog/article.asp? Id = 1791
Asp.net word operations (Comprehensive)
Http://blog.csdn.net/c_g1113/archive/2006/11/16/1388715.aspx
Obtain Microsoft Word documents from ASP. NET
Http://supersand.cnblogs.com/archive/2005/11/09/272152.html
C # How to save text as a word or Excel File
Http://www.cnblogs.com/phinecos/archive/2006/12/14/592635.html
Operate word with. net
Http://www.studycs.com/ShowArticle.aspx? Id = 9
Office com addin development experience
Http://mancini.cnblogs.com/archive/2005/03/28/120398.aspx
WP = new ccwordapp ();
Wp.openwithtemplate(page.mappath(" .doc ");
WP. inserttext ("AA");
WP. gotorightcharacter (14 );
WP. inserttext ("BB");
WP. gotorightcell ();
WP. gotorightcell ();
WP. inserttext ("cc");
... For other information, see the ccwordapp class.
Ccwordapp Wp = NULL is missing at the top;
The ccwordapp class is as follows:
///
/// Summary of ccwordapp.
///
Public class ccwordapp
{
Private word. applicationclass owordapplic; // a reference to word Application
Private word. Document odoc; // a reference to the document
Private object missing = system. reflection. Missing. value;
Public ccwordapp (){
//
// Todo: add the constructor logic here
//
Owordapplic = new word. applicationclass ();
}
// Open a file (the file must exists) and activate it
Public void open (string strfilename)
{
Object filename = strfilename;
Object readonly = false;
Object isvisible = true;
Odoc = owordapplic. documents. open (ref filename, ref missing, ref readonly, ref missing, ref isvisible, ref missing, ref missing );
Odoc. Activate ();
}
// Open a new with template
Public void openwithtemplate (string strfilename ){
Object filename = strfilename;
Odoc = owordapplic. Documents. Add (ref filename, ref missing );
Odoc. Activate ();
}
// Open a new document
Public void open ()
{
Odoc = owordapplic. Documents. Add (ref missing, ref missing );
Odoc. Activate ();
}
Public void quit ()
{
Odoc. Close (ref missing, ref missing, ref missing );
Owordapplic. Quit (ref missing, ref missing, ref missing );
}
Public void save ()
{
Odoc. Save ();
}
Public void saveas (string strfilename)
{
Object filename = strfilename;
Odoc. saveas (ref filename, ref missing, ref missing, ref missing, ref missing );
}
// Save the document in HTML Format
Public void saveashtml (string strfilename)
{
Object filename = strfilename;
Object format = (INT) Word. wdsaveformat. wdformathtml;
Odoc. saveas (ref filename, ref format, ref missing, ref missing, ref missing, ref missing );
}
Public void inserttext (string strtext)
{
Owordapplic. selection. typetext (strtext );
}
Public void insertlinebreak ()
{
Owordapplic. selection. typeparagraph ();
}
Public void insertlinebreak (INT nline)
{
// For (INT I = 0; I -------------------------------------------------------------------------------
}
Public void insertbookmark (string bookmark)
{
/* Vb: With activedocument. bookmarks. Add
* Range: = selection. Range,
* Name: = "DQ"
*. Defaultsorting = wdsortbyname
*. Showhidden = false end
*/
Object range = owordapplic. selection. range;
Owordapplic. activedocument. bookmarks. Add (bookmark, ref range );
}
Public void insertpicture (string filename)
{
/* Vb: selection. inlineshapes. addpicture
* Filename: = ZP,
* Linktofile: = false,
* Savewithdocument: = true
*/
Object linktofile = false;
Object savewithdocument = true;
Owordapplic. selection. inlineshapes. addpicture (filename, ref linktofile, ref savewithdocument, ref missing );
}
// Go to a predefined bookmark, if the Bookmark doesn't exists the application will raise an error
Public void gotobookmark (string strbookmarkname)
{
// VB: selection. goto what: = wdgotobookmark, name: = "Nome"
Object bookmark = (INT) Word. wdgotoitem. wdgotobookmark;
Object namebookmark = strbookmarkname;
Owordapplic. selection. Goto (ref bookmark, ref missing, ref missing, ref namebookmark );
}
Public void gototheend ()
{
// VB: selection. endkey unit: = wdstory
Object Unit; unit = word. wdunits. wdstory;
Owordapplic. selection. endkey (ref unit, ref missing );
}
Public void gotothebeginning (){
// VB: selection. homekey unit: = wdstory Object Unit;
Unit = word. wdunits. wdstory;
Owordapplic. selection. homekey (ref unit, ref missing );
}
Public void gotothetable (INT ntable)
{
// Selection. goto what: = wdgototable, which: = wdgotofirst, Count: = 1, name: = ""
// Selection. Find. clearformatting
// With selection. Find
//. Text = ""
//. Replacement. Text = ""
//. Forward = true
//. Wrap = wdfindcontinue
//. Format = false
//. Matchcase = false
//. Matchwholeword = false
//. Matchwildcards = false
//. Matchsoundslike = false
//. Matchallwordforms = false
// End
Object what; what = word. wdunits. wdtable;
Object which; which = word. wdgotodirection. wdgotofirst;
Object count;
Count = 1;
Owordapplic. selection. Goto (ref what, ref which, ref count, ref missing );
Owordapplic. selection. Find. clearformatting (); owordapplic. selection. Text = "";
}
Public void gotorightcharacter (INT count)
{
// Selection. moveright unit: = wdcharacter
Object COUNT = count;
Object ction;
Direction = word. wdunits. wdcharacter;
Owordapplic. selection. moveright (ref direction, ref count, ref missing );
}
Public void gotorightcharacterandselected (INT count, string extend)
{
// Selection. movedown unit: = wdline, Count: = 32, extend: = wdextend
Object COUNT = count;
Object extend = extend;
Object ction;
Direction = word. wdunits. wdline;
Owordapplic. selection. moveright (ref direction, ref count, ref extend );
}
Public void copynewtable ()
{
/* Vb: selection. wholestory selection. Copy */
// Object extend = word. wdmovementtype. wdextend;
// Object ction = word. wdunits. wdline;
// Owordapplic. selection. movedown (ref direction, ref count, ref extend );
Owordapplic. selection. wholestory ();
Owordapplic. selection. Copy ();
Gotothebeginning ();
}
Public void gotorightcell ()
{
// Selection. moveright unit: = wdcell
Object ction;
Direction = word. wdunits. wdcell;
Owordapplic. selection. moveright (ref direction, ref missing, ref missing );
} Public void gotoleftcell ()
{
// Selection. moveright unit: = wdcell
Object ction;
Direction = word. wdunits. wdcell;
Owordapplic. selection. moveleft (ref direction, ref missing, ref missing );
}
Public void gotodowncell ()
{
// Selection. moveright unit: = wdcell
Object ction;
Direction = word. wdunits. wdline;
Owordapplic. selection. movedown (ref direction, ref missing, ref missing );
}
Public void gotoupcell ()
{
// Selection. moveright unit: = wdcell
Object ction;
Direction = word. wdunits. wdline;
Owordapplic. selection. moveup (ref direction, ref missing, ref missing );
}
Public void gotoupcell (INT count)
{
// Selection. moveright unit: = wdcell
Object COUNT = count;
Object ction;
Direction = word. wdunits. wdline;
Owordapplic. selection. moveup (ref direction, ref count, ref missing );
}
// This function doesn' t work
Public void insertpagenumber (string strtype, bool bheader)
{
Object alignment;
Object bfirstpage = false;
Object BF = true;
// If (bheader = true)
// Wordapplic. selection. headerfooter. pagenumbers. showfirstpagenumber = BF;
Switch (strtype)
{
Case "center ":
Alignment = word. wdpagenumberalignment. wdalignpagenumbercenter;
// Wordapplic. selection. headerfooter. pagenumbers. Add (ref alignment, ref bfirstpage );
// Word. Selection objselection = wordapplic. pselection;
// Owordapplic. selection. headerfooter. pagenumbers. Item (1). Alignment = word. wdpagenumberalignment. wdalignpagenumbercenter;
Break;
Case "right ":
Alignment = word. wdpagenumberalignment. wdalignpagenumberright;
// Owordapplic. selection. headerfooter. pagenumbers. Item (1). Alignment = word. wdpagenumberalignment. wdalignpagenumberright;
Break;
Case "Left ":
Alignment = word. wdpagenumberalignment. wdalignpagenumberleft;
Owordapplic. selection. headerfooter. pagenumbers. Add (ref alignment, ref bfirstpage );
Break;
}
}
}
Combine the above two sections. For other operations, you can first record Macros in word and convert them to C.