Macro Per Word!! »  Mostra messaggi da    a     

Forum LMGB!


OFF TOPIC MEMORABILIA - Macro Per Word!!



Alkimo [ Lun 19 Jun, 2006 10:40 ]
Oggetto: Macro Per Word!!
Ho bisogno di una consulentina informatica.
Siccome non ci chiappo nulla qualcuno di voi mi puņ aiutare a fare una macro su Word che quando la lancio mi salvi il file.DOC aperto in file.TXT col nome che voglio io ?!

mi serve solo le righe di comando.
TNX!


Vex [ Lun 19 Jun, 2006 12:01 ]
Oggetto: Re: Macro Per Word!!
Ti serve qualcosa del genere:

Sub SaveTXT()
ActiveDocument.SaveAs , FileFormat:=wdFormatText, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=1252, InsertLineBreaks:=False, AllowSubstitutions:=False _
, LineEnding:=wdCRLF
End Sub

... ma per automatizzare completamente
o schianti il nome del file in cui salvare e la directory, oppure devi smanettare
ancora un pochino

Sub saveTXT2()
ChangeFileOpenDirectory "C:\DIRECTORY_CHE_VUOI"
ActiveDocument.SaveAs FileName:="NOME_CHE_VUOI.txt", FileFormat:= _
wdFormatText, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=1252, InsertLineBreaks:=False, AllowSubstitutions:=False _
, LineEnding:=wdCRLF
End Sub


Alkimo [ Lun 19 Jun, 2006 12:05 ]
Oggetto: Re: Macro Per Word!!
ero arrivato ad un aforma quasi uguale anch'io con un semplice Sbatti, ho copiato dalla macro convertToPdf :laughing6:
Sub ConvertToText() ' ' ConvertToText Macro ' Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^p" .Replacement.Text = "^p^p" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Font.Underline = wdUnderlineSingle Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "" .Replacement.Text = "_^&_" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^+" .Replac


il vecchio e caro Copia&Incolla ...


figo27 [ Lun 19 Jun, 2006 13:17 ]
Oggetto: Re: Macro Per Word!!
????????????????????????????????????????
??????????????????????????????????????????????
0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0


0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0


0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0


0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0


Alkimo [ Lun 19 Jun, 2006 13:21 ]
Oggetto: Re: Macro Per Word!!
Figo...


ECLATANTE SUPERIORITA' DI PROGRAMMAZIONE!!!




Powered by Icy Phoenix based on phpBB