transfering data excel locked

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Transfering data excel locked sheets (e.g. Table as Picture) fro

Transfering data excel locked sheets (e.g. Table as Picture) fro

resolvedResolved · Urgent Priority · Version 2007

Saqib has attended:
Excel VBA Intro Intermediate course
Excel VBA Advanced course

Transfering data excel locked sheets (e.g. Table as Picture) fro

Transfering data excel locked sheets (e.g. Table as Picture) from Excel & Gant Charts as Pictures from Adobe Acrobat to Word at particular locations

RE: Transfering data excel locked sheets (e.g. Table as Picture)

Hi Saqib, thanks for your query. The following subroutine copies the chart from the Area Report sheet of our Excel spreadsheet to the Word document c:\mydocument.doc which has a bookmark "MyBookmark" somewhere within it. If you have problems identifying the chart on your workbook just record a macro selecting your chart and copying it and amend the lines below. Note, programmatically very difficult to do this from Adobe PDFs. Best to cut and paste those.

Here's the code:

***********************

Sub PositionSpecific()

Dim appWord As Word.Application

Set appWord = New Word.Application

Sheets("Area Report").ChartObjects("Chart 3").Activate
Sheets("Area Report").ChartObjects("Chart 3").Copy

appWord.Documents.Open Filename:="c:\mydocument.doc"
appWord.Selection.GoTo What:=wdGoToBookmark, Name:="MyBookmark"
appWord.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile

appWord.Visible = True

End Sub

***********************

Hope this helps,

Anthony

Tue 4 Oct 2011: Automatically marked as resolved.

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Random Numbers

Type =RAND()*200 to generate a number between 1 and 200.
Use the fill handle to drag down and populate as many cells as you'd like with random numbers.

View all Excel hints and tips


Server loaded in 0.08 secs.