B
bdats
All,
I'm currently running Excel 2000 (SR-1) on a Win98SE box, and my users
are running Excel 2002 on Win2000 machines in a networked setting.
I have an application that functions as a report database of sorts. It
allows a user to select a report/study document (.doc, .txt, .bmp,
..jpg, etc), add descriptive information regarding the report/study and
append that information along with filespec to the data table.
It then creates a small image of the document and places this image
into a comment box in a certain column of the new record.
The idea is to aid the user in locating a specific report/study by
having a small image of it pop up when they hover over the description
column with the cursor.
Up until recently this has all worked nicely in both environments. But
a couple of weeks ago it started placing an "icon" image into the
comment box instead of the image itself when the document is a .jpg
and adding an unwanted label when the document is a .bmp. This is
happening on my computer as well as theirs. Also, the ".jpg" problem
is intermittent.
In creating the image I do the following:
1. Select an "out of the way" cell.
2. Clear the clipboard.
3. Create and paste an image of the report file at the selected cell
using:
ActiveSheet.OLEObjects.Add(Filename:=FileSpec, Link:=False,
DisplayAsIcon:=False).Select
For a .jpg file the image created at this point is an icon image. For
a .bmp, the image is an actual view of the file but with a label at
the bottom.
I'm at a loss to understand what went wrong. I've included the portion
of my code involved below. Any help with this would be greatly
appreciated. I'll post any additional info at your request - just not
sure what else may be pertinent yet.
Thanks again for your help.
'**************************************************************************************************************************************
Sub PreviewPic(strReportName As String, strReportFileSpec As String,
strPreviewSpecCell As String, strPreviewCell As String)
Application.ScreenUpdating = False
Excel.Application.Sheets("ReportData").Range("DA5").Select
Call ClearClipboard
Call CreateAndPlacePreviewPicIntoClipboard(strReportFileSpec)
I'm currently running Excel 2000 (SR-1) on a Win98SE box, and my users
are running Excel 2002 on Win2000 machines in a networked setting.
I have an application that functions as a report database of sorts. It
allows a user to select a report/study document (.doc, .txt, .bmp,
..jpg, etc), add descriptive information regarding the report/study and
append that information along with filespec to the data table.
It then creates a small image of the document and places this image
into a comment box in a certain column of the new record.
The idea is to aid the user in locating a specific report/study by
having a small image of it pop up when they hover over the description
column with the cursor.
Up until recently this has all worked nicely in both environments. But
a couple of weeks ago it started placing an "icon" image into the
comment box instead of the image itself when the document is a .jpg
and adding an unwanted label when the document is a .bmp. This is
happening on my computer as well as theirs. Also, the ".jpg" problem
is intermittent.
In creating the image I do the following:
1. Select an "out of the way" cell.
2. Clear the clipboard.
3. Create and paste an image of the report file at the selected cell
using:
ActiveSheet.OLEObjects.Add(Filename:=FileSpec, Link:=False,
DisplayAsIcon:=False).Select
For a .jpg file the image created at this point is an icon image. For
a .bmp, the image is an actual view of the file but with a label at
the bottom.
I'm at a loss to understand what went wrong. I've included the portion
of my code involved below. Any help with this would be greatly
appreciated. I'll post any additional info at your request - just not
sure what else may be pertinent yet.
Thanks again for your help.
'**************************************************************************************************************************************
Sub PreviewPic(strReportName As String, strReportFileSpec As String,
strPreviewSpecCell As String, strPreviewCell As String)
Application.ScreenUpdating = False
Excel.Application.Sheets("ReportData").Range("DA5").Select
Call ClearClipboard
Call CreateAndPlacePreviewPicIntoClipboard(strReportFileSpec)