Can anybody tell me how this works?

Set fileObj = CreateObject("scripting.filesystemobject")
fileObj.CopyFile strBackEndName, strBackupName, True

Stapes
0
Stapes
3/18/2008 1:51:16 PM
access 16762 articles. 3 followers. Follow

9 Replies
632 Views

Similar Articles

[PageSpeed] 46

That sets a reference to FSO (File System Object), which is part of VB 
Scripting. It then uses FSO's CopyFile method to make a copy of the file.

Now, since I was reading another thread you have going, I'm guessing you 
want to use this because it doesn't give you the "File In Use" error you're 
getting through other methods. Be aware that just because FSO's CopyFile 
method will copy a file that's in use, that doesn't mean it's a good idea to 
do so. That's especially true with Access databases: it's entirely possible 
that the copy will be in an inconsistent state because Access was doing 
something to the file when the copy took place. In other words, your backup 
copy may be incomplete, so that relying on it would be a bad idea.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Stapes" <steve.staple@gmail.com> wrote in message 
news:53ac0e04-2aca-4741-9530-62e030ec7d2f@i29g2000prf.googlegroups.com...
> Set fileObj = CreateObject("scripting.filesystemobject")
> fileObj.CopyFile strBackEndName, strBackupName, True
>
> Stapes 


0
Douglas
3/18/2008 2:50:52 PM
On 18 Mar, 14:50, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> That sets a reference to FSO (File System Object), which is part of VB
> Scripting. It then uses FSO's CopyFile method to make a copy of the file.
>
> Now, since I was reading another thread you have going, I'm guessing you
> want to use this because it doesn't give you the "File In Use" error you're
> getting through other methods. Be aware that just because FSO's CopyFile
> method will copy a file that's in use, that doesn't mean it's a good idea to
> do so. That's especially true with Access databases: it's entirely possible
> that the copy will be in an inconsistent state because Access was doing
> something to the file when the copy took place. In other words, your backup
> copy may be incomplete, so that relying on it would be a bad idea.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "Stapes" <steve.sta...@gmail.com> wrote in message
>
> news:53ac0e04-2aca-4741-9530-62e030ec7d2f@i29g2000prf.googlegroups.com...
>
>
>
> > Set fileObj = CreateObject("scripting.filesystemobject")
> > fileObj.CopyFile strBackEndName, strBackupName, True
>
> > Stapes- Hide quoted text -
>
> - Show quoted text -

So is this routine any safer:

Declare Function CopyFile& Lib "kernel32" Alias "CopyFileA" (ByVal _
lpExistingFilename As String, ByVal lbNewFileName As String, ByVal _
bFailIfExists As Long)


Public Sub MakeFileCopy(strExistingFile As String, _
                    strNewfile As String, _
                    blnDoNotOverWrite As Boolean)


    Dim strMessage As String


    strExistingFile = strExistingFile
    strNewfile = strNewfile


    If CopyFile(strExistingFile, strNewfile, blnDoNotOverWrite) = 1
Then
          strMessage = "File successfully copied."
    Else
        strMessage = "File copy failed."
    End If


    MsgBox strMessage, vbInformation, "Copy File"


End Sub
0
Stapes
3/18/2008 3:34:53 PM
"Stapes" <steve.staple@gmail.com> wrote in message 
news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
>
> So is this routine any safer:

Yes, much.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



0
Douglas
3/18/2008 3:48:19 PM
Do you serisouly believe that?

Do you have any references for that claim?

How is it safer? Have you seen this in writing? Have you tested the
components personally?
I'm not trying to be difficult; I just don't believe everything that I
read online.

I've been using FSO 10 times a day for the past decade and never had
any problem with FSO.
Furthermore; I believe that FSO objects are easier to rewrite
into .NET so I believe it is a 'best practice' to use FSO.

Thanks

-Aaron



On Mar 18, 10:48=A0am, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> "Stapes" <steve.sta...@gmail.com> wrote in message
>
> news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
>
>
>
> > So is this routine any safer:
>
> Yes, much.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)

0
aaron
3/20/2008 11:32:23 PM
Did you bother to read the explanation I gave?

"just because FSO's CopyFile method will copy a file that's in use, that 
doesn't mean it's a good idea to do so. That's especially true with Access 
databases: it's entirely possible that the copy will be in an inconsistent 
state because Access was doing something to the file when the copy took 
place. In other words, your backup copy may be incomplete, so that relying 
on it would be a bad idea."

You should know that Access buffers much of its activity, so that it can 
take a measurable amount of time for a write to actually be completed. 
Unfortunately, since it's a timing-related thing, there's no way to create a 
test that's guaranteed to prove that it's not a good idea, but I'm not 
willing to take the chance that the MDB file will be in a steady state when 
the copy takes place.

There's a reason why the other methods refuse to do the copy!


-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


<aaron.kempf@gmail.com> wrote in message 
news:23f750b5-81a6-4511-a209-f2fe497f3388@59g2000hsb.googlegroups.com...
Do you serisouly believe that?

Do you have any references for that claim?

How is it safer? Have you seen this in writing? Have you tested the
components personally?
I'm not trying to be difficult; I just don't believe everything that I
read online.

I've been using FSO 10 times a day for the past decade and never had
any problem with FSO.
Furthermore; I believe that FSO objects are easier to rewrite
into .NET so I believe it is a 'best practice' to use FSO.

Thanks

-Aaron



On Mar 18, 10:48 am, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> "Stapes" <steve.sta...@gmail.com> wrote in message
>
> news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
>
>
>
> > So is this routine any safer:
>
> Yes, much.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)


0
Douglas
3/21/2008 11:43:43 AM
I just don't get it.

You are claiming the API call is _SAFER_ than the Fso CopyFile-- why
is this?

It seems to me like it's a problem with MDB not with FSO / WSH.
I use FSO / WSH every day and I have for a decade.  It is by far my
2nd favorite library (next to ADO).

I just don't get _WHY_ you can blame it on Fso.CopyFile when it seems
to me like it's a bug in MDB.

Does the API call do something like 'wait until a file isn't being
used'?

I'm just trying to stick to the facts here, thanks.

-Aaron

Douglas J. Steele wrote:
> Did you bother to read the explanation I gave?
>
> "just because FSO's CopyFile method will copy a file that's in use, that
> doesn't mean it's a good idea to do so. That's especially true with Access
> databases: it's entirely possible that the copy will be in an inconsistent
> state because Access was doing something to the file when the copy took
> place. In other words, your backup copy may be incomplete, so that relying
> on it would be a bad idea."
>
> You should know that Access buffers much of its activity, so that it can
> take a measurable amount of time for a write to actually be completed.
> Unfortunately, since it's a timing-related thing, there's no way to create a
> test that's guaranteed to prove that it's not a good idea, but I'm not
> willing to take the chance that the MDB file will be in a steady state when
> the copy takes place.
>
> There's a reason why the other methods refuse to do the copy!
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> <aaron.kempf@gmail.com> wrote in message
> news:23f750b5-81a6-4511-a209-f2fe497f3388@59g2000hsb.googlegroups.com...
> Do you serisouly believe that?
>
> Do you have any references for that claim?
>
> How is it safer? Have you seen this in writing? Have you tested the
> components personally?
> I'm not trying to be difficult; I just don't believe everything that I
> read online.
>
> I've been using FSO 10 times a day for the past decade and never had
> any problem with FSO.
> Furthermore; I believe that FSO objects are easier to rewrite
> into .NET so I believe it is a 'best practice' to use FSO.
>
> Thanks
>
> -Aaron
>
>
>
> On Mar 18, 10:48 am, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> > "Stapes" <steve.sta...@gmail.com> wrote in message
> >
> > news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
> >
> >
> >
> > > So is this routine any safer:
> >
> > Yes, much.
> >
> > --
> > Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> > (no e-mails, please!)
0
aaron
3/21/2008 4:39:36 PM
I just don't get why you're blaming this MDB bug on FSO.

-Aaron




Douglas J. Steele wrote:
> Did you bother to read the explanation I gave?
>
> "just because FSO's CopyFile method will copy a file that's in use, that
> doesn't mean it's a good idea to do so. That's especially true with Access
> databases: it's entirely possible that the copy will be in an inconsistent
> state because Access was doing something to the file when the copy took
> place. In other words, your backup copy may be incomplete, so that relying
> on it would be a bad idea."
>
> You should know that Access buffers much of its activity, so that it can
> take a measurable amount of time for a write to actually be completed.
> Unfortunately, since it's a timing-related thing, there's no way to create a
> test that's guaranteed to prove that it's not a good idea, but I'm not
> willing to take the chance that the MDB file will be in a steady state when
> the copy takes place.
>
> There's a reason why the other methods refuse to do the copy!
>
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> <aaron.kempf@gmail.com> wrote in message
> news:23f750b5-81a6-4511-a209-f2fe497f3388@59g2000hsb.googlegroups.com...
> Do you serisouly believe that?
>
> Do you have any references for that claim?
>
> How is it safer? Have you seen this in writing? Have you tested the
> components personally?
> I'm not trying to be difficult; I just don't believe everything that I
> read online.
>
> I've been using FSO 10 times a day for the past decade and never had
> any problem with FSO.
> Furthermore; I believe that FSO objects are easier to rewrite
> into .NET so I believe it is a 'best practice' to use FSO.
>
> Thanks
>
> -Aaron
>
>
>
> On Mar 18, 10:48 am, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> > "Stapes" <steve.sta...@gmail.com> wrote in message
> >
> > news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
> >
> >
> >
> > > So is this routine any safer:
> >
> > Yes, much.
> >
> > --
> > Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> > (no e-mails, please!)
0
aaron
3/21/2008 4:40:34 PM
To be honest, I wasn't saying that the API call was better because it was an 
API call. I said it was safer because it won't work if the file is in use. 
The VBA FileCopy statement is just as safe, for the same reason.

It's not a bug in MDBs. If you were in the midst of using Word, and someone 
copied your .DOC (or .DOCX) file, you'd have the same issue: you couldn't be 
sure that the backup was 100% accurate. Same thing with any other file type.

SQL Server, and other server-based DBMS, don't have this issue because they 
correctly log all the work that's been done. That's just not reasonable to 
expect with any file-based system.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


<aaron.kempf@gmail.com> wrote in message 
news:9be83620-6d7a-49a5-9c6a-abd0b29d8a55@i29g2000prf.googlegroups.com...
>I just don't get it.
>
> You are claiming the API call is _SAFER_ than the Fso CopyFile-- why
> is this?
>
> It seems to me like it's a problem with MDB not with FSO / WSH.
> I use FSO / WSH every day and I have for a decade.  It is by far my
> 2nd favorite library (next to ADO).
>
> I just don't get _WHY_ you can blame it on Fso.CopyFile when it seems
> to me like it's a bug in MDB.
>
> Does the API call do something like 'wait until a file isn't being
> used'?
>
> I'm just trying to stick to the facts here, thanks.
>
> -Aaron
>
> Douglas J. Steele wrote:
>> Did you bother to read the explanation I gave?
>>
>> "just because FSO's CopyFile method will copy a file that's in use, that
>> doesn't mean it's a good idea to do so. That's especially true with 
>> Access
>> databases: it's entirely possible that the copy will be in an 
>> inconsistent
>> state because Access was doing something to the file when the copy took
>> place. In other words, your backup copy may be incomplete, so that 
>> relying
>> on it would be a bad idea."
>>
>> You should know that Access buffers much of its activity, so that it can
>> take a measurable amount of time for a write to actually be completed.
>> Unfortunately, since it's a timing-related thing, there's no way to 
>> create a
>> test that's guaranteed to prove that it's not a good idea, but I'm not
>> willing to take the chance that the MDB file will be in a steady state 
>> when
>> the copy takes place.
>>
>> There's a reason why the other methods refuse to do the copy!
>>
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> <aaron.kempf@gmail.com> wrote in message
>> news:23f750b5-81a6-4511-a209-f2fe497f3388@59g2000hsb.googlegroups.com...
>> Do you serisouly believe that?
>>
>> Do you have any references for that claim?
>>
>> How is it safer? Have you seen this in writing? Have you tested the
>> components personally?
>> I'm not trying to be difficult; I just don't believe everything that I
>> read online.
>>
>> I've been using FSO 10 times a day for the past decade and never had
>> any problem with FSO.
>> Furthermore; I believe that FSO objects are easier to rewrite
>> into .NET so I believe it is a 'best practice' to use FSO.
>>
>> Thanks
>>
>> -Aaron
>>
>>
>>
>> On Mar 18, 10:48 am, "Douglas J. Steele"
>> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
>> > "Stapes" <steve.sta...@gmail.com> wrote in message
>> >
>> > news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com...
>> >
>> >
>> >
>> > > So is this routine any safer:
>> >
>> > Yes, much.
>> >
>> > --
>> > Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
>> > (no e-mails, please!) 


0
Douglas
3/21/2008 4:54:14 PM
Ok.. perfect. I didn't catch that earlier; I'm sorry for giving you a
hard time.

I just had never heard this about the API before- -it's interesting to
me.  I've got considerable code to do the same thing all over the
place; I'll have to re-examing my CopyFile procedures; thanks!

PS - FileBased systems I've used =3D AS 400, bTrieve, Access, even mySql
is a quasi-file based system (even though it has a real relational
engine).   I believe that AS 400 and mySql properly log; I don't know
about bTrieve..  I think that it supported transactions at least.
Well I believe that a couple of the architectures for mySql supports
logging at least.

I actually _REALLY_ like some file based systems.  I think that having
a seperate file for each table is a no-brainer..  I wish it was an
option on every database (server).  I mean it helps recovery a _LOT_
when you can force out the (clean) data if and when you have trouble.

I was actually retiring the btrieve system.. Never got around to
checking out logging on it ;)

I moved client to SharePoint.. via Access of course.. I had _SUCH_ a
hard time moving this one table to SharePoint.. it was like 17k
records.    Finally someone came over and showed me the same (insert
17k records into SP) using Excel.  It worked instantly.  So it's
obvious that SharePoint lived with that many records-- but the Access
implementation of SharePoint just puked when it hit that many
records.    It's always amazed me-- if Microsoft screwed up SharePoint
- Access so bad in Access 2003 version; why is it that it became the
center of Microsoft strategy for Access 2007?

I love SharePoint.  I just wish that it worked with a larger number of
records and it had enterprise level ETL tools; in a similiar fashion
to DTS / SSIS... but _GUI_ and support Macros and .NET.

I think that 'dumbing down SQL Server to SharePoint' really helps
people get off the heroin (MDB).. so I love SharePoint.

That would really rock-- to turn SharePoint into a full fledged
database eco-system.  As it is; everywhere i've ever been-- people
refused to edit the SQL Store for SharePoint directly.. Which means we
couldn't bulk insert 17k records the logical way- into the SQL table
directly.

I just don't like the idea of a system that doesn't have real ETL
tools in it. That's the thing holding me back from sleeping with
SharePoint (more).

-Aaron

On Mar 21, 9:54=A0am, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> To be honest, I wasn't saying that the API call was better because it was =
an
> API call. I said it was safer because it won't work if the file is in use.=

> The VBA FileCopy statement is just as safe, for the same reason.
>
> It's not a bug in MDBs. If you were in the midst of using Word, and someon=
e
> copied your .DOC (or .DOCX) file, you'd have the same issue: you couldn't =
be
> sure that the backup was 100% accurate. Same thing with any other file typ=
e.
>
> SQL Server, and other server-based DBMS, don't have this issue because the=
y
> correctly log all the work that's been done. That's just not reasonable to=

> expect with any file-based system.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)
>
> <aaron.ke...@gmail.com> wrote in message
>
> news:9be83620-6d7a-49a5-9c6a-abd0b29d8a55@i29g2000prf.googlegroups.com...
>
>
>
> >I just don't get it.
>
> > You are claiming the API call is _SAFER_ than the Fso CopyFile-- why
> > is this?
>
> > It seems to me like it's a problem with MDB not with FSO / WSH.
> > I use FSO / WSH every day and I have for a decade. =A0It is by far my
> > 2nd favorite library (next to ADO).
>
> > I just don't get _WHY_ you can blame it on Fso.CopyFile when it seems
> > to me like it's a bug in MDB.
>
> > Does the API call do something like 'wait until a file isn't being
> > used'?
>
> > I'm just trying to stick to the facts here, thanks.
>
> > -Aaron
>
> > Douglas J. Steele wrote:
> >> Did you bother to read the explanation I gave?
>
> >> "just because FSO's CopyFile method will copy a file that's in use, tha=
t
> >> doesn't mean it's a good idea to do so. That's especially true with
> >> Access
> >> databases: it's entirely possible that the copy will be in an
> >> inconsistent
> >> state because Access was doing something to the file when the copy took=

> >> place. In other words, your backup copy may be incomplete, so that
> >> relying
> >> on it would be a bad idea."
>
> >> You should know that Access buffers much of its activity, so that it ca=
n
> >> take a measurable amount of time for a write to actually be completed.
> >> Unfortunately, since it's a timing-related thing, there's no way to
> >> create a
> >> test that's guaranteed to prove that it's not a good idea, but I'm not
> >> willing to take the chance that the MDB file will be in a steady state
> >> when
> >> the copy takes place.
>
> >> There's a reason why the other methods refuse to do the copy!
>
> >> --
> >> Doug Steele, Microsoft Access MVP
> >>http://I.Am/DougSteele
> >> (no private e-mails, please)
>
> >> <aaron.ke...@gmail.com> wrote in message
> >>news:23f750b5-81a6-4511-a209-f2fe497f3388@59g2000hsb.googlegroups.com...=

> >> Do you serisouly believe that?
>
> >> Do you have any references for that claim?
>
> >> How is it safer? Have you seen this in writing? Have you tested the
> >> components personally?
> >> I'm not trying to be difficult; I just don't believe everything that I
> >> read online.
>
> >> I've been using FSO 10 times a day for the past decade and never had
> >> any problem with FSO.
> >> Furthermore; I believe that FSO objects are easier to rewrite
> >> into .NET so I believe it is a 'best practice' to use FSO.
>
> >> Thanks
>
> >> -Aaron
>
> >> On Mar 18, 10:48 am, "Douglas J. Steele"
> >> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> >> > "Stapes" <steve.sta...@gmail.com> wrote in message
>
> >> >news:cdc8a01e-9b0f-4f7a-b80c-c035a598591d@e23g2000prf.googlegroups.com=
....
>
> >> > > So is this routine any safer:
>
> >> > Yes, much.
>
> >> > --
> >> > Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> >> > (no e-mails, please!)- Hide quoted text -
>
> - Show quoted text -

0
aaron
3/21/2008 7:22:29 PM
Reply:

Similar Artilces:

Can you make excel auto save your workbook?
I need Excel to automaticly save my work every 2 or 3 minutes if that is possible. Can it do that? Hi what Excel version are you using? -- Regards Frank Kabel Frankfurt, Germany "Rhiannon" <Rhiannon@discussions.microsoft.com> schrieb im Newsbeitrag news:FE6930C8-D9D4-46D0-825E-0C25A02C1B71@microsoft.com... > I need Excel to automaticly save my work every 2 or 3 minutes if that is > possible. Can it do that? Excel 2003 "Frank Kabel" wrote: > Hi > what Excel version are you using? > > -- > Regards > Frank Kabel > Frankfurt, Germany &g...

Can I install RMS Store Ops on Small Biz Server 2003 ?
I have a Small Biz Server with the RMS database on an instance of SQL Server. I want to occasionally open Store Ops Manager on that pc to run some reports and accept some store transfers. Q1) Is it o.k. to install the RMS Store Ops programs on this box? Q2) Is it o.k. to install HQ Client on this box? Running SO Mgr on the server isn't an issue. Running HQ Server and HQ Client on a box that hosts both databases is a performance disaster. If the HQ Server is on another box, running HQ client is OK. BEWARE: According to MS, SBS 2003 is a UNSUPPORTED OS for hosting RMS HQ or Sto...

How can I print to email?
I want to send the results from some sheets to people who do not have Excel. If I attach the XLS file, it will be useless to anyone without Excel. I basically want to send what I see on a printout to a printer or Fax. Any ideas? Is there a way to setup email as a printer? This will enable me to use the same method for Word, Powerpoint and other products without caring about the recepients software. Jim Hi Jim You can send the text in the body of the mail I don't know what Excel version you use and which mail program? Or let them download the free Excel viewer You can view and ...

how can I show leading zeros in excel
I am trying to input some numeric data into a spreadsheet, some of the entries have leading zeros, every time I move to the next cell, Excel changes the data by removing the leading zeros. I have tried reformating the cells in question in Number & General, both give me the same problem. Can somebody please help. Using Excel 2002. Thanks. You could either format the cell as Text (then type your data) or you can start with an apostrophe '000123 or you can use a custom format: Format|cells|number tab custom in the type box, put as many 0's as you want 000000 The first two op...

Money Can't Set up a Mortgage Right!
I have issues with Money 2003. I bought a house Nov 2003. I set up the mortgage account and tell it my purchase date. It starts the loan 1/1/2004 because it assumes I have paid Nov interest at closing and won't owe anything until 1/1/2004. This screws up my net worth reports because I had a home asset in Nov 03, but the loan liability doesn't appear until Jan 04. Broken! I can't seem to set the loan date to force it to recognize the Nov loan beginning date. What to do?? Thanks, Ben Money starts the loan in 1/1/2004 because that's the date you told it the first payment...

does VS C++ 2005 actually work????
I recently purchased Microsoft VS 2005 and just cannot seem to get it working. 1. I tried converting a VS 2002 solution to VS 2005. It took a while to realize there is a bug in Intellisense. The only solution was to disable Intellisense. 2. It seems class view has been rendered inoperable now that Intellisense has been disabled. So this means browsing by namespaces and classes is not possible. 3. I tried debugging the application but it seems the debugger cannot find certain debug libraries such as 'MFC80UD.DLL'. I posted a message and hope someone will know what is ha...

Change the working directory for a MFC application
I am trying to change the working directory of a MFC application after the application execution begins. Chdir or setcurrentdirectory doesnot work for a MFC application. Can anyone suggest how i can do this? Thanks, - Akila. Akila wrote: > I am trying to change the working directory of a MFC application after > the application execution begins. > > Chdir or setcurrentdirectory doesnot work for a MFC application. > > Can anyone suggest how i can do this? > > Thanks, > - Akila. > SetCurrentDirectory does work for a MFC application. If it doesn't seem ...

How can I initialize the value?
template < class elemType > class MyArray { public: explicit MyArray( int size = DefaultArraySize ); MyArray( elemType *array, int array_size ); MyArray( const MyArray &rhs ); virtual ~MyArray() { delete [] ia; } bool operator==( const MyArray& ) const; bool operator!=( const MyArray& ) const; MyArray& operator=( const MyArray& ); int size() const { return _size; } virtual elemType& operator[](int index) { return ia[index]; } virtual void sort(); virtual elemType min() cons...

Can Function results be calculated?
Hi all I have a sheet with two columns of figures. I show the running totals of each column in cells with basic SUM Functions, at the top of the sheet. I now want to subtract one total from the other. How is this done? As the Function is looking at cells that themselves hold Functions, I can't see how to do this, short of making a longer Function that adds the column contents again and then subtracts. So, in summary: I have two cells with Functions. These are: Cell F4 =SUM(F8:F45) and Cell G4 =SUM(G8:G45) I want to do this: =F4-G4 but it won't play. Any advice most appreciated....

Getting Data Shapes to Work with Custom Stencils
I imported a picture and saved it as a shape. Then I linked data from a SQL database. I can get the data to show up in the Shape Date, but I can't get a Data Graphic to appear. Note that I can get Data Graphics to work with out of the box shapes in the same drawing - just not the custom picture. Tried in both Visio 2007 and 2010 Beta. What am I doing wrong? Thanks in advance. ...

How can I list active OWA users
We have two front end Exchange servers running Exchange 2003. I need to list the active OWA connections on each server. What is the best way to do this? Thanks in advance MikeC MikeC <MikeC@discussions.microsoft.com> wrote: >We have two front end Exchange servers running Exchange 2003. I need to list >the active OWA connections on each server. What is the best way to do this? Use WMI? -- Rich Matheisen MCSE+I, Exchange MVP MS Exchange FAQ at http://www.swinc.com/resource/exch_faq.htm Don't send mail to this address mailto:h.pott@getronics.com Or to these, either: ma...

GALMOD32.exe not working #2
Hello. When the users of the domain run GALMOD32.exe it acts like it saves the settings but when I look at the gal those settings don't stick. I have done the following site suggestions about adding "self" to delegate control, but still no luck. Anyone have any suggestions on how I can get users to update the gal themselves and have it actually stick. http://mcpmag.com/columns/article.asp?EditorialsID=873 Thanks, -comb In article <MPG.1ef200b44f090d1b989684@news.newsreader.com>, whore@whore.com says... > Hello. > > When the users of the domain run GALM...

Can I protect Livemail on laptop with a password ?
I "download" all my email from Yahoo server and work with it under Livemail on laptop. Laptop is going for a warranty repair - I will have to give the repairer my windows user password which means they will have access to my livemail messages, contacts ec - can I further protect my email in any way while laptop is out of my hands ? "Croz" <Croz@discussions.microsoft.com> wrote in message news:DCD9FA83-09D0-430C-AE26-4AA406D488CD@microsoft.com... > I "download" all my email from Yahoo server and work with it under Livemail on laptop. > Lapt...

XP Machines Don't work after Win7 crash
Well this has happened twice now where the XP Virtual Machines will not work after either a WIN7 crash or an auto reboot when updates are installed. Today, Windows was stalled or running so slow that I couldn't get into the virtual machines to shut them down for a re-boot. I had to force a logoff. When I tried to use a shortcut to startup an XP Virtual machine it wouldn't do anything when I clicked on it. It re-acted the same way when I clicked on the vmc file itself. Fortunately I had a backup of the machine. The first time this happened was when automatic updates we...

Can I use VBA to add cells (over blanks) then do multiplication
I have a Word table in which the last column contains numbers (3 and 4) and some bank cells and I want it add them and put the total into the second last row (7 in this case). The last row contains a multiplier (3) which when applied to the total results in 21. Below is the table. | | | 3 | | | | | | | | 4 | | | | 7 | | | 3 |21| How can I achieve this in VBA (under Word 2003 and 2007) remembering that the user can add rows to the table and the last column can contain blank cells. Thanks in advance for any assistance, Peter Evans Sub ScratchMaco(...

Outlook 2007 Not Working after IE8B2 Install
Outlook 2007 has stopped working since I installed IE8 beta 2 I start OL2007 - the "blank" screen and splash are displayed along with a Windows Installer dialogue box with the text "Preparing to install...". I gave it half an hour it just sits there, I killed OL and rebooted, OL asked if I wanted to start in Safe Mode I responded in the affirmative but the Windows Installer window is still there. Neither Task Manager, Process Explorer nor System Explorer show a Task or Process for an installer. The Windows Installer window is owned by the Outlook 2007 process, its ...

Auto Accept not working Outlook 2003
Hi, I hope someone can help me with this problem. We are using Exchange with some resource mailboxes and sharing their calendars. For every meeting room we have created a resource mailbox. We would like the room to accept every metting request. But for some reason it is not working. It just doesnt accept anything. In Outlook i went to Tools | Options | Calendar Options | Resource Scheduling and checked the box Automatically accept...... Then i closed Outlook and logged of the user. I waited for 15 minutes, but it just doesnt work. I tried it with outlook 2003 and outlook 2007. We are runn...

How can I access my documents on OW free trial ?
When i receive a doc. I cannot alter it because it tells me the doc. is locked. How can I get roung this? If it's locked, you either haven't activated your copy of Office, or your trial period ended in which case you will have to pay for it. Yves "Ben" <Ben@discussions.microsoft.com> wrote in message news:8F75A123-D010-4B85-AA39-838E567413E6@microsoft.com... > When i receive a doc. I cannot alter it because it tells me the doc. is > locked. How can I get roung this? ...

How can you show the new items in a refreshed document?
When refreshing a spreadsheet that is pulling information from a different database, is there a way to highlight the new lines? ...

Can Import Email Data Filed from Office XP to Office 2003
My HD failed but I had a backup of my Office XP Pro personal file folder with a lot of emails I needed. The file is about 128MB in size. I put a new HD in and installed Office 2003 Pro. When I go to open the old file Outlook 2003 says that the file "is not a personal folders file". (It was backed up to a CD ROM prior to the crash so the source file should be good.) I really don't want to uninstall Office 2003 and put back Office XP. Any idea why 2003 won't open the file and how to work around that? Many thanks in advance to anyone who knows the solution. Alan. The only pro...

Can I import addresses from Blackberry into Outlook 2010?
Is there a way to import from a Blackberry into Outlook 2010? Addresses at a minumum, but perhaps also messages. Most PDA software will offer an option to synchronize with Outlook. Ask Blackberry if they do. This is not an Outlook question. -- Russ Valentine "CHuck" <CHuck@discussions.microsoft.com> wrote in message news:AC006E4F-736F-4936-9582-4E52CEB7387D@microsoft.com... > Is there a way to import from a Blackberry into Outlook 2010? Addresses at > a > minumum, but perhaps also messages. Check with Blackberry to see if they support Outlook 2010 ...

How? Default is current date, but user can edit if needed?
I want Start Date field to default to the current date, but allow the user to change it if needed. Start Date field has a format of Short Date with a mask __/__/__. The boss wants the field to default to the current date to eliminate keystrokes for the user. Scenario: User forgot to input data yesterday that must reflect yesterday's date. How can the field be formatted to allow the user to change the Start Date field if the field defaults to current date? When a field has a default value, it can be changed as you want. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele...

ExMerge stops working until I backup information store
I use ExMerge to archive mailboxes of people who leave the company and about 80 percent of the time if works fine. But every now and then I get a failure with the log saying it was unable to open the message store. Despite having the correct permissions, it will continue to fail until I back up the mailbox store and then it works fine again. Can anyone explain to me what the backup is doing that then allows ExMerge to work. Thanks, Jan i never heard of anything like that before...are these accounts disabled? are you re-enabling them? -- Susan Conkey [MVP] "Jan" <user...

Can't compile at VC++ Express Edition 2008
Hi I just switched to window programming. I have a code which I can compile and run under Unix, but I cant compile it at Window VC++ Express Edition 2008. Here is some part of my code cpp-trick.h #if !defined(PACKET) || !defined(INTEGER) || !defined(STRING) #error Not all necessary macros were defined. #endif PACKET(Auth, STRING(username) STRING(password) ) PACKET(Ack, INTEGER(status) STRING(error_text) ) #undef PACKET #undef INTEGER #undef STRING typedef enum { #define INTEGER(name) #define STRING(name) #define PACKET(name, fields...

can't open VB editor in Excel 2007 under Vista
I have a spreadsheet with VB code in it. On my XP PC I can edit it without any problem. On my Vista PC, I can run the code, but if I try to edit it I get "error in loading dll". The VB window opens up, but the modules won't. Also, it used to work - I don't know why it stopped. Can anyone help? Thanks! On Nov 11, 3:42=A0am, "Sandy Rosenberg" <srosenb...@bloomfieldct.deleteme.org> wrote: > I have a spreadsheet with VB code in it. =A0On my XP PC I can edit it wit= hout > any problem. =A0On my Vista PC, I can run the code, but if I try to edit = it...