![]() |
#2
|
||||
|
||||
![]()
Hi sasdde,
I know nothing of SAS, but from from I can see in your code there is no reference to either a textbox or a bookmark. You say you've been able to insert the picture into the document using a bookmark. Have you tried putting the bookmark inside the textbox? Also, when inserting a picture into a textbox, it has to be inserted in the 'in-line with text' format (ie as an inlineshape). As I understand it, you can impelement both Wordbasic and VBA in SAS. The VBA equivalent would be: Code:
ActiveDocument.InlineShapes.AddPicture "C:\Users\picture.jpg", , , ActiveDocument.Shapes(1).TextFrame.TextRange or With ActiveDocument.Shapes(1).TextFrame .TextRange.InlineShapes.AddPicture "C:\Users\picture.jpg", , , .TextRange End With Code:
ActiveDocument.InlineShapes.AddPicture "C:\Users\picture.jpg", , , ActiveDocument.Bookmarks("BkMk").Range or With ActiveDocument.Bookmarks("BkMk") .Range.InlineShapes.AddPicture "C:\Users\picture.jpg", , , .Range End With As you can see, with the bookmark, there's no need to reference the textbox, or know which of any number of shapes in the document it might be.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
obasanla | Mail Merge | 6 | 11-26-2012 11:53 PM |
![]() |
ibrahimaa | Excel Programming | 2 | 04-28-2012 12:27 AM |
![]() |
elemental | Word | 1 | 04-29-2011 06:33 PM |
![]() |
rfhall50 | Word VBA | 2 | 10-25-2010 12:41 PM |
![]() |
alexcalgary | Drawing and Graphics | 2 | 10-16-2010 03:29 PM |