请问:将WORD某一页保存为图片怎么写

更新时间:2023-06-08 09:04:31 阅读: 评论:0

请问:将WORD某一页保存为图片怎么写
程序代码:
* * WORD选择页另存为图片 * DECLARE 侧面描写是什么long OpenClipboard IN ur32 long DECLARE long CloClipboard IN ur32 DECLARE long EmptyClipboard IN Ur32 DECLARE long GetClipboardData IN ur32 long DECLARE long GdiplusStartup IN gdiplus long@,string@,long DECLARE long农村鬼故事真实 GdiplusShutdown IN gdiplus long DECLARE long GdipCreateBitmapFromHBITMAP IN gdiplus long,long,long@ DECLARE补牙后注意事项 long GdipDispoImage IN gdiplus long DECLARE long GdipSaveImageToFile IN gdiplus long,string,string,long cPath = 'd:\temp\test\111\' inFile = cPath '111.doc' outFile = cPath '111.png' stGSI = 0h01000000000000000000000000000000 pGDI = 0 GdiplusStartup(@pGDI, @stGSI, 0) wd = CREATEOBJECT('Word.Application') doc = wd.Documents.Open(inFile) nPage = 2 && 选择的页号 rng = doc.GoTo(1, 1, nPage) && 页开始位置 rng.Select rng.SetRange(rng.Start, rng.Bookmarks('\page').End) && 整个页面区域 rng.Copy &&CopyAsPicture wd.Documents.电影杀人回忆Clo wd.Documents.Add wd.Selection.PasteS
pecial(0, .f., 0分手时说的话, .f., 0, '', '') wd.ActiveDocument.InlineShapes(1).Range.CopyAsPicture ClipBitmapToFile(outFile) wd.ActiveDocument.Saved = .t. wd.Documents.Clo ClearClipboard() wd.Quit GdiplusShutdown(pGDI) CLEAR 虐待小说ALL RETURN FUNCTION ClearClipboard() OpenClipboard(0) EmptyClipboard() CloClipboard() ENDFUNC FUNCTION ClipBitmapToFile(cOutFile) IF OpenClipboard(0) == 0 喜欢你歌词RETURN .f. ENDIF LOCAL hClip hClip = GetClipboardData(2) IF hClip == 0 CloClipboard() RETURN .f. ENDIF LOCAL pngGUID, hBitmap pngGUID = 0h06F47C55041AD3119A730000F81EF32E hBitmap = 0 GdipCreateBitmapFromHBITMAP(hClip, 2, @hBitmap) GdipSaveImageToFile(hBitmap, STRCONV(cOutFile 0h00,5), pngGUID, 0) GdipDispoImage(hBitmap) CloClipboard() RETURN藕带 .t. ENDFUNC

本文发布于:2023-06-08 09:04:31,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/1021848.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:选择   图片   电影   补牙   开始   页面   虐待   歌词
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图