Hi
I'm looking for a way to insert a picture in the header of a word document, created by the following code:
Does anyone have an idea on how to do this?Code:Range("A1:G16").Select Selection.Copy Dim a As Object Set a = Nothing Set a = CreateObject("Word.Application") a.Documents.Add a.Selection.Paste Application.CutCopyMode = False a.Visible = True
Thanks in advance.
//Scifo
Hi,
You need to select the Header and then insert your picture ...
HTHActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.InlineShapes.AddPicture ....
I'm sorry, I'm new to VBA, but when I try this code, the image is
placed under the first pasted selection.
Code:Range("A1:G16").Select Selection.Copy Dim a As Object Set a = Nothing Set a = CreateObject("Word.Application") a.Documents.Add a.Selection.Paste ' K3:L8 contains the picture Range("K3:L8").Select Selection.Copy a.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader a.Selection.Paste a.Visible = True
Last edited by scifo; 02-16-2010 at 10:16 AM. Reason: Couldent delete old post
JeanRage -> Maybe I got your code wrong, are you able to look at my above posted code, and tell me where I failed?
As I have not recieved a fullfilling answer in a long time, I close this thread.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks