Prev: Word bookmark names global search & replace
Next: Convert word document to JPEG. The word doc may contain heade
From: Vijayaram B on 31 Dec 2009 00:56 Hi, Is there any one to help me out. I copied the content of a word document(should have the print border guide extended than normal page layout) and created a jpeg image by using the below code. But we see the truncation issue in the left and right side of the captured image. Please help to resolve the truncation issue in the captured image. On Error GoTo err: Dim x As New Word.Application Dim w As New Word.Document Set w = x.Documents.Open("C:\Vet11.doc") Clipboard.Clear With w.Application.Selection .WholeStory .CopyAsPicture Picture1.Picture = Clipboard.GetData(3) SavePicture Clipboard.GetData(3), "c:\vet1.bmp" End With w.Close Set w = Nothing Set x = Nothing MsgBox "successfully done" Exit Sub err: MsgBox err.Description
From: Graham Mayor on 31 Dec 2009 02:18
Do yourself a favour - install the trial version of SnagIt and send the document to the SnagIt 'printer' driver. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>>< ><<> <>>< <>><<> "Vijayaram B" <VijayaramB(a)discussions.microsoft.com> wrote in message news:A11994BD-67E5-4525-ACDE-FAC31B0D8E1C(a)microsoft.com... > Hi, > Is there any one to help me out. > > I copied the content of a word document(should have the print border guide > extended than normal page layout) and created a jpeg image by using the > below > code. But we see the truncation issue in the left and right side of the > captured image. Please help to resolve the truncation issue in the > captured > image. > > On Error GoTo err: > Dim x As New Word.Application > Dim w As New Word.Document > > Set w = x.Documents.Open("C:\Vet11.doc") > Clipboard.Clear > With w.Application.Selection > .WholeStory > .CopyAsPicture > Picture1.Picture = Clipboard.GetData(3) > SavePicture Clipboard.GetData(3), "c:\vet1.bmp" > End With > w.Close > Set w = Nothing > Set x = Nothing > MsgBox "successfully done" > Exit Sub > err: > MsgBox err.Description > |