Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Graphics / December 2003

Tip: Looking for answers? Try searching our database.

Link pictures by default?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Leeke - 28 Nov 2003 16:42 GMT
Working in Word 2002:

By default, Microsoft Word embeds pictures in a document. Is it possible to
get Word to link pictures by default?

John
macropod - 29 Nov 2003 05:57 GMT
Hi John,

You could do that with a macro, but it would probably be best to write it so
that it doesn't automatically convert everything that gets pasted to a link,
then attach your macro to a customised toolbar button.

The macro recorder will give you the basics of how to go about pasting a
link:
Selection.InlineShapes.AddPicture FileName:= "C:\Temp\My
Pictures\Picture.gif", LinkToFile:=True, _
SaveWithDocument:=False
but you'll need to add code to browse through folders and select the file
you want, instead of using the hardcoded example above. A google search
should turn up plenty of examples.

Cheers
macropod - 29 Nov 2003 11:20 GMT
Hi John,

Further to my previous post, try the following macro:

Sub InsertPicture()
With Dialogs(wdDialogInsertPicture)
   .Display
   .LinkToFile = True
   .Execute
End With
End Sub

Cheers
John Leeke - 29 Nov 2003 16:05 GMT
> Further to my previous post, try the following macro:
>
[quoted text clipped - 5 lines]
> End With
> End Sub

Once again, I thank you for excellent advice. This macro appears to work
well and meets my needs. I have set it up with a toolbar button.

I am not very knowledgeable about macros.
When in the file selection dialog, using the drop-down menu for Insert,
Insert and Link, etc., has no effect. The file is always linked. This is
just fine for me. Will leaving the .LinkToFile set to True affect any other
command? Should the .LinkToFile be reset to anything in particular at the
end of the routine?

If I cancel the file selection dialog I get a run-time error message 5152.
Is there a little code that can be added to cancel gracefully?

John
macropod - 06 Dec 2003 10:51 GMT
Hi John,

Been offline for a few days. To avoid the run-time error, you could insert:
   On Error Resume Next
as the second line. There's no need to set the LinkToFile property at the
end of the macro - it's completely volatile and won't affect anything else.

Cheers

> > Further to my previous post, try the following macro:
> >
[quoted text clipped - 20 lines]
>
> John
pre - 06 Dec 2003 12:17 GMT
If you plan more dialogbox work you may find valuable info here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd10/htm
l/wohowDialogArguments.asp

The address must be on one unbreaken line.

You may realize that calling a dialogue through VBA is identical to call the
dialogue directly.  Only when you, using the argument list specify special
statements , VBA will interfere.

Also a search in the KB?s for built-in dialog is worth while.
--
pre

> Working in Word 2002:
>
> By default, Microsoft Word embeds pictures in a document. Is it possible to
> get Word to link pictures by default?
>
> John
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.