WD97: Inserting Linked Picture Results in Absolute PathLast reviewed: March 18, 1998Article ID: Q164622 |
The information in this article applies to:
SYMPTOMSWhen you record a macro to insert a picture( on the Insert menu point to Picture and click From File) and,
WORKAROUNDTo change the path for the linked picture, edit the recorded macro and change the path for the linked picture from "absolute" to "relative."
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONWhen you insert a picture into a document and the picture is located in the same folder or in a folder belonging to the same folder as your document, if you choose Link to File, the linked path for the picture is stored as a "relative path". For example, if the document path is
c:\My Documents\MyPage\mydoc.docand the picture file path is
c:\My Documents\MyPage\Images\myimage.bmpviewing the field code, the relative path is:
{INCLUDEPICTURE "Images\\myimage.bmp" \* MERGEFORMAT \d}However, when you record a macro to insert a linked picture whose path is relative to the document in which it is being inserted, the path is recorded and played back as an absolute path. For example, the resulting macro would record and play back the path to the picture, in the IncludePicture field, as:
{INCLUDEPICTURE "c:\My Documents\MyPage\Images\myimage.bmp" \* MERGEFORMAT \d}To toggle the viewing of field codes, on the keyboard, press and hold "Alt" then press F9.
REFERENCESFor more information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q163435 TITLE : VBA: Programming Resources for Visual Basic for Applications |
Additional query words: vb vba vbe
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |