old macro on a new office version

×

מיכל

hallo
i am using a macro in windows 98, word 97.
now that i am trying to instal it on winxp, word2003/2007 it doesnt work
exactly
like it used to.
does somebody knows if i should add a parameter to the macro in order to
make work properly on the higher version.
 
×

מיכל

hay
i am adding the code below and i will explain it better: the process goes
like the folowing: i am getting a txt.file and i am openning it in WORD. i am
using the macro in order to arrange the table and it's working wonderfully.
when i am using it on winxp/word2003 the lines of the table are crooked not
as the 97 version.

Sub convertion2()
'
' convertion2 מ×קרו
' מ×קרו נוצר ב- â€15/09/06 על-ידי Oper'

Selection.WholeStory
Application.KeyboardLatin
Selection.LtrPara
Selection.HomeKey Unit:=wdLine
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(2)
.BottomMargin = CentimetersToPoints(2)
.LeftMargin = CentimetersToPoints(1.5)
.RightMargin = CentimetersToPoints(1.5)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.27)
.FooterDistance = CentimetersToPoints(1.27)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(21)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.GutterStyle = wdGutterStyleBidi
.SectionDirection = wdSectionDirectionRtl
End With
Selection.WholeStory
Selection.Font.Size = 8
ActiveWindow.ActivePane.SmallScroll Down:=-22
Selection.Font.Size = 9

Selection.Find.ClearFormatting
With Selection.Find
.Text = "A G R E X C O R E V E N U E R E P O R T"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
End With

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "*0*0*0*0*0"
.Replacement.Text = "^m"
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

MsgBox "RTF תהליך ההמרה הסתיי×. × × ×œ×©×ž×•×¨ ×ת הקובץ בסיומת"
End Sub


Sub convertion1()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top