Go Back   CDN Business Directory > Main Category > Microsoft Money

 
 
Thread Tools Display Modes
 
Old 08-08-2005, 05:57 AM
Bob Peel MVP
Guest
 
Posts: n/a
Default Re: Reimport data from a Money archive

Many of us see no justification for archiving - it causes more problems, as
you have found, than it has ever solved.

--
Regards
Bob Peel,
Microsoft MVP - Money

For UK tips & fixes see
http://support.microsoft.com/default...d=fh;EN-GB;mny.
For wishes or suggestions see
http://register.microsoft.com/mswish/suggestion.asp
or for UK wishes http://www.microsoft.com/uk/support/money/feedback

I do not respond to any emails that I have not specifically asked for.

"Matt Tyler" <mctyler01[at]hotmail.com> wrote in message
news:OBzy$J9mFHA.3312[at]tk2msftngp13.phx.gbl...
- quote -

> I recently needed to "undo" an archive process and found that Microsoft
> made no prevision for "going back" with the archive process. (Its because
> Money archives transactions that have not been reconciled that I needed to
> go back).
> Here is what I ended up doing:
> 1. In the archive money file, choose to export your account (only one at a
> time per .qif file). You can only export to a .qif file.
> 2. Since the archive file actually contains all of the transactions
> entered up to the point of archiving, you will more than likely will have
> duplicate entries if you decide to "restore" the full .qif file, from a
> recent archive. Because of this you need to edit the .qif file with a
> editor of your choice. You need to remove the entries that will be
> duplicated. In my case I archived on a year boundary (2004 and older) so
> I just deleted any entry (in the .qif file) with a 2005 date.
> 3. Once the .qif file is the way you want, open your money file, select
> File | Import | Recover Accounts..., select the .qif file you just
> edited, back up your money file (Money prompts you to do so) before
> continuing, select the account and press Ok. Money takes a few seconds to
> minutes to respond to you after pressing Ok. Its just re-importing all
> that data.
> Some times editing a .qif file can be daunting, I threw together a quick
> VB script that __allowed me__ to remove just the 2005 year data (to
> prevent importing duplicate entries and subsequently from having to delete
> them out of Money). Below is this script. I use a regular expression to
> search for the data with a date of 2005. A sample pattern looks like
> "D6/6'2005" (without quotes). The variable data is the month and day,
> which can both be 1 to 2 numbers. This variation makes it difficult to
> substring and perform comparison. Also, you do not necessarily want to
> exclude all data that only contains the characters 2005, so searching just
> for that value is problematic. If the regular expression is not your
> style you can replace it with Instr() function. This script reads the
> exported .qif file and writes out a new "edited" version. You will need
> to change the path names and file names of the .qif file strings to suit
> your system. The script file name needs to end as .VBS. If you have a
> virus tool, like Norton Anti-virus, it more than likely will attempt to
> block the script. You will have to figure out what to do if that happens.
> I MAKE ABSOLUTELY NO WARRANTY FOR THIS POST AND SCRIPT! USE THEM AT YOUR
> OWN RISK! THIS SCRIPT WAS RUN ON ONLY ONE SYSTEM RUNNING WINXP SP2! Go
> to www.microsoft.com and search for scripting or subscribe to a scripting
> news group from Microsoft (new.microsoft.com).
> !============ SCRIPT BEGIN ============!
> Const ForReading = 1
> Const ForWriting = 2
> DIM re
> Set re = New RegExp
> re.pattern = "D[0-9]/[0-9]*'2005"
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objScriptFile = objFSO.OpenTextFile(_
> "path\2004 Archive.qif", _
> ForReading)
> Set objCommentFile = objFSO.OpenTextFile(_
> "path\2004 Archive formatted.qif", _
> ForWriting, TRUE)
> dim string
> objCommentFile.Write "!Type:Bank" + vbCrLF
> Do While objScriptFile.AtEndOfStream <> TRUE
> strCurrentLine = objScriptFile.ReadLine
> if Instr(1,strCurrentLine,"!Type:Bank") = 0 then
> If Instr(1,strCurrentLine,"^") = 0 then
> string = trim(string) +rtrim(strcurrentline) +vbCrLf
> End if
> If Instr(1,strCurrentLine,"^") = 1 Then
> If NOT re.Test(string) Then
> '--- If Instr(1,string,"'2005") = 0 Then
> objCommentFile.Write string +"^" +vbCrLf
> End if
> string = ""
> End if
> End If
> Loop
> objScriptFile.Close
> objCommentFile.Close
> !============ SCRIPT END ============!



  #-1  
Old 08-08-2005, 04:34 AM
Matt Tyler
Guest
 
Posts: n/a
Default Reimport data from a Money archive

I recently needed to "undo" an archive process and found that Microsoft made
no prevision for "going back" with the archive process. (Its because Money
archives transactions that have not been reconciled that I needed to go
back).

Here is what I ended up doing:

1. In the archive money file, choose to export your account (only one at a
time per .qif file). You can only export to a .qif file.

2. Since the archive file actually contains all of the transactions entered
up to the point of archiving, you will more than likely will have duplicate
entries if you decide to "restore" the full .qif file, from a recent
archive. Because of this you need to edit the .qif file with a editor of
your choice. You need to remove the entries that will be duplicated. In my
case I archived on a year boundary (2004 and older) so I just deleted any
entry (in the .qif file) with a 2005 date.

3. Once the .qif file is the way you want, open your money file, select File
| Import | Recover Accounts..., select the .qif file you just edited, back
up your money file (Money prompts you to do so) before continuing, select
the account and press Ok. Money takes a few seconds to minutes to respond
to you after pressing Ok. Its just re-importing all that data.

Some times editing a .qif file can be daunting, I threw together a quick VB
script that __allowed me__ to remove just the 2005 year data (to prevent
importing duplicate entries and subsequently from having to delete them out
of Money). Below is this script. I use a regular expression to search for
the data with a date of 2005. A sample pattern looks like "D6/6'2005"
(without quotes). The variable data is the month and day, which can both be
1 to 2 numbers. This variation makes it difficult to substring and perform
comparison. Also, you do not necessarily want to exclude all data that only
contains the characters 2005, so searching just for that value is
problematic. If the regular expression is not your style you can replace it
with Instr() function. This script reads the exported .qif file and writes
out a new "edited" version. You will need to change the path names and file
names of the .qif file strings to suit your system. The script file name
needs to end as .VBS. If you have a virus tool, like Norton Anti-virus, it
more than likely will attempt to block the script. You will have to figure
out what to do if that happens.

I MAKE ABSOLUTELY NO WARRANTY FOR THIS POST AND SCRIPT! USE THEM AT YOUR
OWN RISK! THIS SCRIPT WAS RUN ON ONLY ONE SYSTEM RUNNING WINXP SP2! Go to
www.microsoft.com and search for scripting or subscribe to a scripting news
group from Microsoft (new.microsoft.com).


!============ SCRIPT BEGIN ============!
Const ForReading = 1
Const ForWriting = 2
DIM re
Set re = New RegExp
re.pattern = "D[0-9]/[0-9]*'2005"

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objScriptFile = objFSO.OpenTextFile(_
"path\2004 Archive.qif", _
ForReading)
Set objCommentFile = objFSO.OpenTextFile(_
"path\2004 Archive formatted.qif", _
ForWriting, TRUE)

dim string
objCommentFile.Write "!Type:Bank" + vbCrLF

Do While objScriptFile.AtEndOfStream <> TRUE
strCurrentLine = objScriptFile.ReadLine
if Instr(1,strCurrentLine,"!Type:Bank") = 0 then
If Instr(1,strCurrentLine,"^") = 0 then
string = trim(string) +rtrim(strcurrentline) +vbCrLf
End if
If Instr(1,strCurrentLine,"^") = 1 Then
If NOT re.Test(string) Then
'--- If Instr(1,string,"'2005") = 0 Then
objCommentFile.Write string +"^" +vbCrLf
End if
string = ""
End if

End If
Loop

objScriptFile.Close
objCommentFile.Close

!============ SCRIPT END ============!


 

Tags
archive, data, money, reimport
Similar Threads
Thread Forum Replies Last Post
MSM2005 and archive file - can I un-archive safely?
Gary: Several months ago, I archived year 2003 transactions from my mny file into a separate file. Recently, I realized that it's been a really long...
Microsoft Money 3 11-27-2004 04:46 PM
Money Archive
Judie: Although my "Money" program will do a back-up, it won't archive 1 year of data. I'm using a brand new, newly formatted disc and I get a message...
Microsoft Money 1 08-26-2004 05:24 PM
archive data
alex: I'd like to archive my previous years in another file. I tried the ARCHIVE option but what it is doing is deleting my 2003 transactions but i want...
Microsoft Money 6 06-27-2004 10:49 PM
When to archive - Money 2002.
Chas: Approximately what should the maximum size of the .mny file be before archiving it - using Money 2002?
Microsoft Money 1 06-08-2004 08:15 PM
Money 04 Archive won't shed old data
dainw: I have tried to archive to create a new file with only this year's data. I have selected all files, some files and single files but it fails to...
Microsoft Money 1 08-30-2003 12:34 PM



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

All times are GMT. The time now is 10:27 AM.