LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Wild card in filepath

i'm using office 2003 and trying to paste an image from a file. The
actual image name is constant, "theone.jpg" but the actual subfolder
is different and is something like "c:\documents\data\232 - 123 Sesame
St\pictures\." The name of the subfolder "232 - 123 Sesame St" is
variable. I want to be able to insert the picture using a wild card
such as "c:\documents\data\232 * \pictures\" but that returns in
error. What is the correct way to insert a wild card in the file path?

Here is the code I have so far that isn't working:
Sub Macro1()

Dim mypath As String
Dim filename As String
Dim fullpath As String

filename = "theone.jpg"
mypath = "c:\documents\data\232 * \pictures\"
MsgBox (mypath)
Selection.InlineShapes.AddPicture (mypath & filename)
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wild Card Search fi.or.jp.de Excel Worksheet Functions 2 August 3rd 09 07:56 PM
VLOOKUP with Wild Card? RoadKill Excel Worksheet Functions 2 February 29th 08 06:14 PM
wild card in sumproduct BNT1 via OfficeKB.com Excel Worksheet Functions 3 November 26th 07 04:10 AM
Wild Card!!!??? Sean Excel Programming 3 August 31st 06 06:55 PM
Wild card * Herman Excel Worksheet Functions 0 October 21st 05 01:39 PM


All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"