请问:将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