社区
ASP
帖子详情
请问如何利用ASP设置WORD2000中的初始编辑文件?
nottom
2000-04-05 10:56:00
如何利用ASP编程设置WORD2000中的初始编辑文件,以便在打开WORD2000编辑器时,设置的打开文件已经打开?
...全文
76
回复
打赏
收藏
请问如何利用ASP设置WORD2000中的初始编辑文件?
如何利用ASP编程设置WORD2000中的初始编辑文件,以便在打开WORD2000编辑器时,设置的打开文件已经打开?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
推荐免费好用的Web在线Office(
Word
)
编辑
控件
版本修改记录: V2.2.0.2修改: 修改了HttpPost相对路径的一些问题。 V2.2.0.0增加: [id(0x00010041), helpstring("Get Rev Index")] HRESULT GetRevCount( [out,retval] long * pbool); [id(0x00010042), helpstring("Get Rev Index Info")] HRESULT GetRevInfo([in] long lIndex, [in] long lType, [out,retval] BSTR* pbool); [id(0x00010043), helpstring("Set Doc Prop")] HRESULT SetValue([in] BSTR strValue, [in] BSTR strName, [out,retval] long* pbool); [id(0x00010044), helpstring("Set Doc Variable")] HRESULT SetDocVariable([in] BSTR strVarName, [in] BSTR strValue,[in] long lOpt, [out,retval] long* pbool); [id(0x00010045), helpstring("Save page To Doc")] HRESULT SetPageAs([in] BSTR strLocalFile, [in] long lPageNum, [in] long lType,[out,retval] long* pbool); ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- LoadDso.js var s = "" s += "" s += "" document.write(s) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- 接口文档: /* 1.新建 */ //新建
Word
document.all.FramerControl1.CreateNew("
Word
.Document"); //新建Excel document.all.FramerControl1.CreateNew("Excel.Sheet"); /* 2.打开
文件
*/ //打开制定的本地
文件
document.all.FramerControl1.Open("C:\\TestBook.xls"); //制定用
Word
来打开c:\plain.txt
文件
document.all.FramerControl1.Open("C:\\Plain.txt",false, "
Word
.Document"); //打开服务器的
文件
document.all.FramerControl1.Open "https://secureserver/test/mytest.
asp
?id=123",true, "Excel.Sheet", "MyUserAccount", "MyPass
word
"); //打开服务器的
文件
document.all.FramerControl1.Open("http://localhost/1.doc", true); /* 3.保存
文件
*/ //到本地 document.all.FramerControl1.Save("c:\\1.doc",true); //服务器 /*增加Http协议Post上传接口,可以Post一个动态页面(jsp,
asp
,php...),由动态页面负责解析数据 bool HttpInit(); bool HttpAddPostString(BSTR strName, BSTR strValue); bool HttpAddPostCurrFile(BSTR strFileID, BSTR strFileName); BSTR HttpPost(BSTR bstr); */ //
初始
化Http引擎 document.all.FramerControl1.HttpInit(); //增加Post变量 document.all.FramerControl1.HttpAddPostString("RecordID","20060102200"); document.all.FramerControl1.HttpAddPostString("UserID","李局长"); //上传打开的
文件
document.all.FramerControl1.HttpAddPostCurrFile("FileData", "文档名.doc"); //执行上传动作 document.all.FramerControl1.HttpPost("http://xxxx.com/uploadfile.
asp
"); /* 4.修订留痕 */ //进入留痕状态 document.all.FramerControl1.SetTrackRevisions(1); //进入非留痕状态 document.all.FramerControl1.SetTrackRevisions(0); //接受当前修订 document.all.FramerControl1.SetTrackRevisions(4); /* 5.
设置
当前用户 */ document.all.FramerControl1.SetCurrUserName("张三"); /* 6.
设置
当前时间(笔迹留痕会显示("Like 2006:02:07 11:11:11") */ document.all.FramerControl1.SetCurrTime("2006:02:07 11:11:11"); /* 7.
设置
和创建书签,此功能比较强大,
设置
书签数据、添加书签和添加红头
文件
就靠他了 SetFieldValue(BSTR strFieldName, BSTR strValue, BSTR strCmdOrSheetName) strFieldName:书签名 strValue:要
设置
的值 strCmdOrSheetName: 命令 ::ADDMARK:: 添加BookMark ::DELMARK:: 删除这个BookMark ::GETMARK:: 定位到这个BookMark ::FILE:: 插入的是
文件
::JPG:: 插入的是图片 一般来说:
WORD
中
书签是做好的,可以通过此接口把外界数据
设置
进书签
中
去。 */ //在当前
WORD
位置插入标签,标签名为"book1",数值为"test" document.all.FramerControl1.SetFieldValue("book1","test","::ADDMARK::"); //
设置
书签"Time",数值为"2006-03-16 22:22:22" document.all.FramerControl1.SetFieldValue("Time","2006-03-16 22:22:22",""); //在书签位置"hongtou",插入红头
文件
"http://222.222.222.222/hongtou1.doc" 这样,红头就自动插进去了 document.all.FramerControl1.SetFieldValue("hongtou","http://222.222.222.222/hongtou1.doc","::FILE::"); /* 8.
设置
菜单显示情况 BOOL SetMenuDisplay(long lMenuFlag) lMenuFlag为以下数值的组合 #define MNU_NEW 0x01 #define MNU_OPEN 0x02 #define MNU_CLOSE 0x04 #define MNU_SAVE 0x08 #define MNU_SAVEAS 0x16 #define MNU_PGSETUP 0x64 #define MNU_PRINT 0x256 #define MNU_PROPS 0x32 #define MNU_PRINTPV 0x126 */ //只有“新建”菜单可用 document.all.FramerControl1..SetMenuDisplay(1); //只有“打开”菜单可用 document.all.FramerControl1.SetMenuDisplay(2); //只有“打开”和“新建”菜单可用 document.all.FramerControl1.SetMenuDisplay(3); /* 9.保护文档和解保护文档 lProOrUn:1:保护文档;0:解除保护 lProType: wdNoProtection = -1, wdAllowOnlyRevisions = 0, wdAllowOnlyComments = 1, wdAllowOnlyFormFields = 2 strProPWD:密码 */ //完全保护文档,密码为"pwd" document.all.FramerControl1.ProtectDoc(1,1,"pwd"); //解除文档保护 document.all.FramerControl1.ProtectDoc(0,1,"pwd"); /* 10.显示或隐藏修订内容 ShowRevisions(long nNewValue) nNewValue = 0 则隐藏修订 = 1 则显示修订 */ //显示修订留痕 document.all.FramerControl1.ShowRevisions(1); //隐藏修订留痕 document.all.FramerControl1.ShowRevisions(0); /* 11.插入合并
文件
, strFieldPath
文件
路径,可以是http,ftp的路径 pPos = 0 //当前鼠标位置 1;
文件
开头 2;
文件
末尾 pPos的第4位为1的时候,代表插入的是图片 InSertFile(BSTR strFieldPath, long lPos) */ //
文件
头部插入
文件
document.all.FramerControl1.InSertFile("http://XX.com/XX.doc",1); //
文件
尾部插入
文件
document.all.FramerControl1.InSertFile("http://XX.com/XX.doc",2); //当前光标位置插入
文件
document.all.FramerControl1.InSertFile("http://XX.com/XX.doc",0); //
文件
头部插入图片 document.all.FramerControl1.InSertFile("http://XX.com/XX.jpg",9); //
文件
尾部插入图片 document.all.FramerControl1.InSertFile("http://XX.com/XX.jpg",10); //当前光标位置插入图片 document.all.FramerControl1.InSertFile("http://XX.com/XX.jpg",8); /* 0x31. 文档另存为 HRESULT SaveAs([in] VARIANT strFileName, [in] VARIANT dwFileFormat, [out,retval] long* pbool); 参数: strFileName:
文件
本地路径,如c:\\11.doc dwFileFormat:
文件
格式 dwFileFormat的数值为: Excel: Type enum XlFileFormat { xlAddIn = 18, xlCSV = 6, xlCSVMac = 22, xlCSVMSDOS = 24, xlCSVWindows = 23, xlDBF2 = 7, xlDBF3 = 8, xlDBF4 = 11, xlDIF = 9, xlExcel2 = 16, xlExcel2FarEast = 27, xlExcel3 = 29, xlExcel4 = 33, xlExcel5 = 39, xlExcel7 = 39, xlExcel9795 = 43, xlExcel4Workbook = 35, xlIntlAddIn = 26, xlIntlMacro = 25, xlWorkbookNormal = -4143, xlSYLK = 2, xlTemplate = 17, xlCurrentPlatformText = -4158, xlTextMac = 19, xlTextMSDOS = 21, xlTextPrinter = 36, xlTextWindows = 20, xlWJ2WD1 = 14, xlWK1 = 5, xlWK1ALL = 31, xlWK1FMT = 30, xlWK3 = 15, xlWK4 = 38, xlWK3FM3 = 32, xlWKS = 4, xlWorks2FarEast = 28, xlWQ1 = 34, xlWJ3 = 40, xlWJ3FJ3 = 41, xlUnicodeText = 42, xlHtml = 44 };
Word
: Type enum WdSaveFormat { wdFormatDocument = 0, wdFormatTemplate = 1, wdFormatText = 2, wdFormatTextLineBreaks = 3, wdFormatDOSText = 4, wdFormatDOSTextLineBreaks = 5, wdFormatRTF = 6, wdFormatUnicodeText = 7, wdFormatEncodedText = 7, wdFormatHTML = 8 }; PPT: enum PpSaveAsFileType { ppSave
AsP
resentation = 1, ppSave
AsP
owerPoint7 = 2, ppSave
AsP
owerPoint4 = 3, ppSave
AsP
owerPoint3 = 4, ppSaveAsTemplate = 5, ppSaveAsRTF = 6, ppSaveAsShow = 7, ppSaveAsAddIn = 8, ppSave
AsP
owerPoint4FarEast = 10, ppSaveAsDefault = 11, ppSaveAsHTML = 12, ppSaveAsHTMLv3 = 13, ppSaveAsHTMLDual = 14, ppSaveAsMetaFile = 15, ppSaveAsGIF = 16, ppSaveAsJPG = 17, ppSave
AsP
NG = 18, ppSaveAsBMP = 19 }; */ /* 0x32. 删除本地
文件
HRESULT DeleteLocalFile([in] BSTR strFilePath); 参数: strFileName:
文件
本地路径,如c:\\11.doc */ /* 0x33.创建临时
文件
HRESULT GetTempFilePath([out,retval] BSTR* strValue); 返回: 临时
文件
的路径地址。使用完后,用DeleteLocalFile 删除 */ /* 0x34.
设置
文档显示模式 HRESULT ShowView([in] long dwViewType, [out,retval] long * pbool); dwViewType的可取值为: enum WdViewType { wdNormalView = 1, wdOutlineView = 2, wdPrintView = 3, wdPrintPreview = 4, wdMasterView = 5, //这个是大纲 wdWebView = 6 }; */ //大纲模式 document.all.FramerControl1.ShowView(5); /* 0x39:下载远程
文件
HRESULT DownloadFile( [in] BSTR strRemoteFile, [in] BSTR strLocalFile, [out,retval] BSTR* strValue); 参数: strRemoteFile:远程路径地址,http or Ftp strLocalFile: 本地保存地址,if strLocalFile == NULL then Create Temp File and return TempFile's Path */ /* 0x40:增加Http上传时候的,附加其他
文件
HRESULT HttpAddPostFile([in] BSTR strFileID, [in] BSTR strFileName, [out,retval] long* pbool); 参数: strFileID:
文件
的ID,供服务器端页面解析 strFileName: 本地
文件
地址 */ /* 0x41,0x42.获取详细的修订信息。 GetRevCount( [out,retval] long * pbool); GetRevInfo([in] long lIndex, [in] long lType, [out,retval] BSTR* pbool); 例子如下 */ var vCount; vCount = document.all.FramerControl1.GetRevCount(); alert(vCount); var vOpt = 0; var vDate; for(var i=1; i<= vCount; i++){ vOpt = document.all.FramerControl1.GetRevInfo(i,2); if("1" == vOpt){ vOpt = "插入"; }else if("2" == vOpt){ vOpt = "删除"; }else{ vOpt = "未知操作"; } vDate = new String(document.all.FramerControl1.GetRevInfo(i,1)); vDate = parseFloat(vDate); alert(vDate); dateObj = new Date(vDate); alert(dateObj.getYear() + "年" + dateObj.getMonth() + 1 + "月" + dateObj.getDate() +"日" + dateObj.getHours() +"时" + dateObj.getMinutes() +"分" + dateObj.getSeconds() +"秒" ); alert("用户:"+document.all.FramerControl1.GetRevInfo(i,0) + "\r\n操作:" + vOpt + "\r\n内容:" + document.all.FramerControl1.GetRevInfo(i,3)); } /* 0x43.
设置
基本信息: HRESULT SetValue([in] BSTR strValue, [in] BSTR strName, [out,retval] long* pbool); 1.
设置
文件
只读密码 SetValue("pass
word
","::DOCPROP:Pass
Word
"); 2.
设置
文件
修改密码 SetValue("pass
word
","::DOCPROP:WritePW"); 返回值: 0 正确 -1:不支持此命令,请确定您的第二个参数没有传错 -127:异常 */ //
设置
文件
只读密码 document.all.FramerControl1.SetValue("pass
word
","::DOCPROP:Pass
Word
"); //
设置
文件
修改密码 document.all.FramerControl1.SetValue("pass
word
","::DOCPROP:WritePW"); /* 0x44.
设置
文档变量,这个很少能用到 HRESULT SetDocVariable([in] BSTR strVarName, [in] BSTR strValue,[in] long lOpt, [out,retval] long* pbool); strVarName: 变量名 strVlaue:变量值 lOpt: 操作类型, 按位 第一位为1: 表示update域关联的 第二位为1: 表示如果没有这个变量则添加 第三位为1: 未来支持 return: 0:OK -127:异常 */ /* 0x45: 分页保存 HRESULT SetPageAs([in] BSTR strLocalFile, [in] long lPageNum, [in] long lType,[out,retval] long* pbool); strLocalFile:本地路径 lPageNum:页数 */
ASP
.NET Core 基础 部署至Linux
该课程是胡延亮老师完成了相关《
ASP
.NET MVC》课程后,一套全新的课程,该课程围绕微软**的
ASP
.NET Core 开源和跨平台技术展开讲解,主要为从
ASP
.NET开发向
ASP
.NET Core跨平台开发提供帮助。本课程主要围绕
ASP
.NET Core的基础内容讲解。如:
ASP
.NET Core为什么能跨平台,他的扩平台模型是怎么样的,他的程序构建主要有什么组成等等。
ASP
.NET Core 是一个跨平台的高性能开源框架,用于生成基于云且连接 Internet 的新式应用程序。 使用
ASP
.NET Core,您可以: 创建 Web 应用程序和服务、IoT 应用和移动后端。 在 Windows、macOS 和 Linux 上使用喜爱的开发工具。 部署到云或本地。 在 .NET Core 或 .NET Framework 上运行。主要内容第一讲什么是
ASP
.NET Core第二讲
ASP
.NET Core 基本架构第三讲
ASP
.NET Core OWIN第四讲 创建
ASP
.NET Core第一个程序第五讲
ASP
.NET Core 运行静态
文件
1第六章
ASP
.NET Core运行默认
文件
第七讲
ASP
.NET Core MVC启动第八讲
ASP
.NET Core MVC
设置
默认路由第九章 Linux centos7搭建.net Core环境第十章 Linux部署
Asp
.net Core mvc第十一章
ASP
.NET Core EF连接SQL SERVER第十二章
ASP
.NET Core EF MySQL至Linux
ewebeditor6.2
asp
版(绝对能用,带后台)
eWebEditor是基于浏览器的、所见即所得的在线HTML
编辑
器。她能够在网页上实现许多桌面
编辑
软件(如:
Word
)所具有的强大可视
编辑
功能。WEB开发人员可以用她把传统的多行文本输入框
替换为可视化的富文本输入框,使最终用户可以可视化的发布HTML格式的网页内容。eWebEditor!已基本成为网站内容管理发布的必备工具! 在线截屏/截图自动上传(新) 一键排版、去干扰字(新) 选择性粘贴/图片粘贴(新) Flash宽高自检/FLV插入(新) 只读调用接口(新) 输入框调用上传
文件
对话框(新) 限宽模式调用(新)
初始
隐藏调用模式 客户端API调用示例 上传
文件
接口示例 外部样式CSS引用接口示例 自动或手动远程
文件
获取 相对或绝对路径 缩略图 文字水印和图片水印 图文混排 无限级优化撤消和恢复 本地
文件
自动上传
Word
文档导入/粘贴/转图片(新) Excel电子表格导入 服务器端
文件
浏览/共享
文件
库
在线
编辑
器eWebEditorPHP3.8版本
最新更新(V3.80) ============================= 1. 增加服务器端图片、Flash等
文件
插入功能,图片预览功能,及后台可
设置
此功能的开关。 2. 增加多个示例调用代码。 3. 修复当
编辑
器被
初始
为不显示时,工具栏上的按钮有可能被压缩堆在一起的问题。 4. 修复JSP版后台程序属性值有空格的匹配错误 5. 修复英文界面的"热点图片"对话框
中
,"确定","取消"按钮看不见的问题 6. 修复
ASP
版无组件上传方法,部分
中
文名无法上传及
文件
大于
设置
值时无响应的问题 7. 修复
ASP
版图片水印可能不能使用的问题 8. 修复段落属性对话框
中
单字间距使用了没有效果的问题 9. 修复繁体语言包编码错误的问题 10. 修复从
WORD
中
拷贝部分样式丢失的问题 11. 修复JSP版在Linux系统下
文件
路径错误的问题 12. 修复在代码模式粘贴时,单引号被转全角的问题 13. 修复PHP+Apache下的
文件
上传问题 14. 修复所有已知BUG
ASP
28,390
社区成员
357,060
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章