+ Reply to Thread
Results 1 to 3 of 3

Shape.Fill.UserPicture - Mapped Drive vs. UNC

  1. #1
    Registered User
    Join Date
    09-24-2010
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2000
    Posts
    2

    Shape.Fill.UserPicture - Mapped Drive vs. UNC

    Hello,

    This is my first post ever on a forum so I hope I do it correctly. I have searched everywhere for a solution to my problem but have had no luck anywhere.

    The code I have created inserts pictures into a comment box in excel for a list of equipment. This is a simplified snippet of my code:

    Please Login or Register  to view this content.
    The problem is that if strPic = "\\full unc file path\equipment pictures\725.bmp"
    the comment box is not filled with the picture.
    However the code works fine if the file path is mapped such as if
    strPic= "M:\equipment pictures\725.bmp"

    Does Shape.Fill.UserPicture not recognize UNC file paths? or is it because the string variable is too long?

    Thanks in advance,

    Josh
    Last edited by jbruce23; 09-24-2010 at 04:12 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    15,816

    Re: Shape.Fill.UserPicture - Mapped Drive vs. UNC

    Put your UNC in a cell on a worksheet and double click it. See if Excel can find it that way.
    Do the same with the FilePath.

    This should allow you to answer your own question.

    Also - can you map a drive letter to your UNC? Try to map a drive letter W: to the UNC and do the above again.

    hope this helps.

  3. #3
    Registered User
    Join Date
    09-24-2010
    Location
    Calgary, Alberta
    MS-Off Ver
    Excel 2000
    Posts
    2

    Re: Shape.Fill.UserPicture - Mapped Drive vs. UNC

    Hello Marvin,

    Thanks for the quick response. I have tried your suggestion/tips. These are my results.
    Excel recognized when I entered "\\PYRAMID\Common\Project Controls\Cost Estimating Directory - New\Interim Sharing Folder\Equipment Pictures\Articulated Trucks\730.bmp" into a cell and double clicked it. The picture would open in paint. However it would not recognize my mapped path "M:\Interim Sharing Folder\Equipment Pictures\Articulated Trucks\730.bmp" which is opposite to the problem I am having in Visual Basic.

    I have also tried entering both paths into the URL at the top of my internet explorer and both of them work that way (they both open in paint).

    Unfortunately the company I work for has the "W:" drive already mapped. But I have implemented a temporary work around for the problem. I force a mapped drive on the users "Z:" drive in order for the code to recognize the picture files. The only problem is that I am banking on nobody in the office having something already mapped to their "Z:"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1