[ vojvoda1010 @ 04.08.2018. 11:49 ] @
Da li postoji mogucnosti da rename otvorenog word dokumenta, ili nekom opcijom ili pomocu macro-a?

nasao sam dva macro ali svaki mi pokazuje neku gresku.

1. macro 1

Sub RenameDocumentWithDate()
Dim strDocName, strDocNameNoExten, strDocFullName, strDocPath As String
Dim strNewDocName As String
Dim KillFile As String
Dim strDate As String

' Get the current doc name.
strDocName = ActiveDocument.Name
strDocFullName = ActiveDocument.FullName
strDocNameNoExten = Left(strDocName.Name, Len(strDocName.Name) - 5)
strDocPath = ActiveDocument.Path
strDate = Format(Date, "mm - dd - yyyy")

If strDocPath = "" Then
MsgBox ("This document hasn't been saved. You can't rename it.")
Exit Sub
End If

' Save the doc in new name with date.
ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
KillFile = strDocFullName
Kill KillFile
End Sub


run time error `438`
object dosn`t support this property or method
[ bokinet @ 04.08.2018. 19:15 ] @
Treba prepraviti deo koda u ovom kodu sto je dat:

Code:

strDocNameNoExten = Left(strDocName.Name, Len(strDocName.Name) - 5)


na

Code:

strDocNameNoExten = Left(strDocName, Len(strDocName) - 5)


Takodje ako fajl nije snimljen pre toga, onda ce strDocPath biti prazan string i javice se MsgBox kako je predvidjeno u source code-u.

Tu se moze dodati parce koda da onda bar pita za lokacuju i pozove dialog za 'browse for folders' ili klasican File Save As dialog.

Ovaj ceo kod moze da se stavi u tkz. NORMAL TEMPLATE deo kako bi bio dostupan uvek i da ne mora da se ubacuje u svaki dokument.
[ vojvoda1010 @ 04.08.2018. 23:22 ] @
opet isto error, sada ovde javlja se problem

ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
[ bokinet @ 05.08.2018. 02:20 ] @
1. Koja verzija Word je u pitanju i gde je postavljen kod tj kako isti izvrsava?

2. Koje su vrednosti za dole navedene promenljive neposredno pre izvrsvanja koda 'If strDocPath = "" Then'

strDocName
strDocFullName
strDocNameNoExten
strDocPath
strDate

3. Da li imas privilegije da mozes da upises fajl na lokaciji gde pokusavas da snimis isti? Probaj da snimis fajl na desktop posto tu uvek treba da imas privilegije da mozes i da citas i da pises i da brises tj. r/w.

4. Evo screenshotova da radi.







Evo koda:

Code:

Sub RenameDocumentWithDate()
    Dim strDocName, strDocNameNoExten, strDocFullName, strDocPath As String
    Dim strNewDocName As String
    Dim KillFile As String
    Dim strDate As String

    ' Get the current doc name.
    strDocName = ActiveDocument.Name
    strDocFullName = ActiveDocument.FullName
    strDocNameNoExten = Left(strDocName, Len(strDocName) - 5)
    strDocPath = ActiveDocument.Path
    strDate = Format(Date, "mm - dd - yyyy")
    
    Debug.Print strDocName
    Debug.Print strDocFullName
    Debug.Print strDocNameNoExten
    Debug.Print strDocPath
    Debug.Print strDate

    If strDocPath = "" Then
        MsgBox ("This document hasn't been saved. You can't rename it.")
        Exit Sub
    End If

    ' Save the doc in new name with date.
    ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
    KillFile = strDocFullName
    Kill KillFile
    
End Sub
[ vojvoda1010 @ 05.08.2018. 08:26 ] @
opet isto.

koristim 2007.

snimljeno na desktopu.

u prilogu greska i kod koji sam ubacio.


[ bokinet @ 05.08.2018. 15:58 ] @
Verovatno da Word 2007 nema podrsku za komandu koja se poziva - ActiveDocument.SaveAs2.

To mozes da proveris preko Object Browser-a u VBA. Imas dole sliku kako.

Takodje mozes da izmenis red da umest SaveAs2 bude SaveAs


Code:

ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate


u

Code:

ActiveDocument.SaveAs FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate




[ vojvoda1010 @ 05.08.2018. 19:12 ] @
kada sam uradio bez saveas2 samo snimio isto ime i dodao datum a nece kao u adresi ispod, da mi ponudi da rename file>

https://www.datanumen.com/blog...art-ways-rename-document-word/
[ bokinet @ 05.08.2018. 21:00 ] @
Nece da te pita za ime zato sto u kod nemas deo za to da te pita jer fali InputBox f-ja.

Ako pogledas kod koji se nalazi na linku koji si prosledio videces dole navedeni deo kod da je prisutan.

Code:

 '  Pop up an input box for new name.
  strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocName)


Ja sam ti preradio malo kod i dodao podrsku za obe varijante SaveAs i SaveAs2, gde se ustvari na osnovu verzije Word koristi odredjena komanda.
Ako je u pitanju Word 2007 i stariji onda se koristi SaveAs a ako je novija verzija od Word 2007 onda se koristi SaveAs2.

Takodje u prilogu imas sliku na kojoj predlazem da na isti nacis smestis kod za ovo i da ga kasnije malo sredis i optimizujes.
Tako ubacen kod kao makro mozes posle da 'nakacis' na neki 'button' u Toolbaru ili Menu-ju.

U nastavku doradjen kod:

Code:


Sub RenameDocumentWithDate()

    Dim strDocName, strDocNameNoExten, strDocFullName, strDocPath As String
    Dim strNewDocName As String
    Dim KillFile As String
    Dim strDate As String

    ' Get the current doc name.
    strDocName = ActiveDocument.Name
    strDocFullName = ActiveDocument.FullName
    strDocNameNoExten = Left(strDocName, Len(strDocName) - 5)
    strDocPath = ActiveDocument.Path
    strDate = Format(Date, "mm - dd - yyyy")
    
    Debug.Print strDocName
    Debug.Print strDocFullName
    Debug.Print strDocNameNoExten
    Debug.Print strDocPath
    Debug.Print strDate

    If strDocPath = "" Then
        MsgBox ("This document hasn't been saved. You can't rename it.")
        Exit Sub
    End If

    '  Pop up an input box for new name.
    strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocName)
    
    ' Check MS Word version
    ' Word versions are 15 - 2013, 14 -> 2010, 12 - 2007, 11 - 2003
    ' If MS Word version is newer then MS Word 2007 then
    If Val(Application.Version) > 12 Then
        
        ' Save the doc in new name with date.
        ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
        
    ' If MS Word version is 2007 or older then
    Else
    
        ' Save the doc in new name with date.
        ActiveDocument.SaveAs FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
    
    End If
    
    KillFile = strDocFullName
    Kill KillFile
    
End Sub



p.s. Ja nemam ovde nigde instaliran MS Word 2007 tako da nisam bio u mogucnosti da proverim da li ovo radi ali opet treba da radi bez problema. Kod je inace radjen na MS Word 2013. Videcu ako budem stigao pa da probam bas eto cisto i MS Word 2007.
[ bokinet @ 06.08.2018. 01:22 ] @
Stigao sam da proverim sa MS Word 2007.
Kod radi bez problema.
U prilogu su screenshotovi.
[ vojvoda1010 @ 06.08.2018. 15:34 ] @
ne znam da li sam dobro uradio, ali kada mi se pojavi dijalog da upisem ime fajla, i upisem drugo ime fajla, snimi se onako kako je bilo samo dodat datum.

npr.ime fajla mi je `new document`, on snimi kao `new document 08 - 06 - 2018`, a treba da ga snimi `moj fajl`. to ne uspeva, nije nuzno da bude datum pored iemna fajla.
[ bokinet @ 06.08.2018. 17:03 ] @
Zameniti

'strDocNameNoExten' ako se hoce sa datumom u nastavku

ili

'strDocNameNoExten & " " & strDate' ako se hoce bez datuma

sa

'strNewDocName' vrednoscu, posto se vrednost iz inputbox-a smesta u 'strNewDocName' promenljivu.



Ja nisam pitao a sta se tacno pravi i zeli postici ovim kodom kao finalni rezultat?
[ vojvoda1010 @ 06.08.2018. 17:53 ] @
krajnji rezultat da snimljeni prvi fajl npr.zove se file1, kada se otvori da se tako otvoren preimenuje na npr.dokumen, ili neko drugo ime.


imam mnogo dokumenata koje treba ds preimenujem ali ne mogu da znam kako dok ne otvorim
[ bokinet @ 06.08.2018. 18:06 ] @
1. Trenutno otvoreni file se zove 'Doc1'

2. Kod treba da odradi kad se izvrsi:

3. Da predlozi i pita za novo ime file-a (sa/bez datuma) - koristeci inputbox?

4. Snimi file pod novim imenom na istoj lokaciji i

5. Obrise postojece file 'Doc1' koji se nalazi na istoj lokaciji

?

Takodje u opisu nisi jasno rekao da li je naziv file-a sa/bez datuma.
[ vojvoda1010 @ 06.08.2018. 19:48 ] @
u prilogu sta se desava.

ime dokumenta je proba proba 1, i ja bih da preimenujem novo ime dokumenta, a on ga sam preimenuje u proba proba 1 06-08-2018
[ bokinet @ 06.08.2018. 20:56 ] @
Znaci nije potrebno da se dodaje u nazivu file-a datum kao sto je primer i kao sto je bilo s' pocetka.

Brzinski sam ti dodao sve okvirno u kodu sta je trazeno u poslednjoj poruci.

Nadam se da je sad to to.

Takodje, sugestija dobronameran je da ubuduce se definise sta se hoce i da se odradi idejno koncept sta se hoce kako bi se to posle pretvorilo u kod.

Sve sto se gore pisano je malo konfuzno i nije bas lepo definisano... (nije zlurado vec opet dobronamerno receno).

Ostavio samo delove koda u komentarima cisto da mozes da vidis razlike i da mozes malo da prostudiras kod posto vidim da se nema bas puno iskustva sa VBA.

Code:

Sub RenameDocumentWithDate()

    Dim strDocName, strDocNameNoExten, strDocFullName, strDocPath As String
    Dim strNewDocName As String
    Dim SaveAsFilename As String

    ' Get the current doc name
    strDocName = ActiveDocument.Name
    
    ' Get current full filename
    strDocFullName = ActiveDocument.FullName
    
    ' Get current filename path only
    strDocPath = ActiveDocument.Path
    
    ' Get current filename extension - since can be 3 or 4 char. len e.g. filename.doc || filename.docx  ...
    strDocExt = Right(strDocName, Len(strDocName) - InStrRev(strDocName, "."))
    
    ' Old > strDocNameNoExten = Left(strDocName, Len(strDocName) - 5)
    
    ' Set current filename without extension
    strDocNameNoExten = Left(strDocName, Len(strDocName) - (Len(strDocExt) + 1))
    
    ' If Document path isn't set then
    If strDocPath = "" Then
        
        ' Show messagebox to user
        MsgBox ("This document hasn't been saved. You can't rename it.")
        Exit Sub
        
    End If

    ' Pop up an input box for new name.
    ' Old > strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocName)
    strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocNameNoExten)
    
    ' If new filename isn't set then exit
    If Len(Trim(strNewDocName)) = 0 Then
        
        ' Show messagebox to user
        MsgBox ("Name of this document hasn't been set. You can't save it.")
        Exit Sub
        
    End If
    
    ' If filename is same and already exists
    If LCase(strNewDocName) = LCase(strDocNameNoExten) Then
        
        ' If current file already exists then
        If Dir(strDocFullName) <> "" Then
            
            ' Show messagebox to user
            MsgBox ("You can't use same name of file for saving." & vbCrLf & "Please try again by entering a diffrent filename.")
            Exit Sub

        End If
        
    End If
    
    ' If backslash isn't present on the end of path then add it
    If Right(strDocPath, 1) <> "\" Then strDocPath = strDocPath & "\"
    
    ' Create filename with full location where will be saved
    SaveAsFilename = strDocPath & strNewDocName
    
    Debug.Print "Document name:", strDocName
    Debug.Print "Document name without ext.:", strDocNameNoExten
    Debug.Print "Document full name:", strDocFullName
    Debug.Print "Document path:", strDocPath
    Debug.Print "New document name:", strNewDocName
    Debug.Print "Save document as filename:", SaveAsFilename
    
    ' Check MS Word version
    ' Word versions are 15 - 2013, 14 -> 2010, 12 - 2007, 11 - 2003
    ' If MS Word version is newer then MS Word 2007 then
    If Val(Application.Version) > 12 Then
        
        
        ' Old > ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
        ' ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strNewDocName
        
        ' Save current document with new filename
        ActiveDocument.SaveAs2 FileName:=SaveAsFilename
        
        
    ' If MS Word version is 2007 or older then
    Else
    
        
        ' Old > ActiveDocument.SaveAs FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
        ' ActiveDocument.SaveAs FileName:=strDocPath & "\" & strNewDocName
        
        ' Save current document with new filename
        ActiveDocument.SaveAs FileName:=SaveAsFilename
    
    End If
    
    On Error Resume Next
    
    ' Delete current (original) file
    Kill strDocFullName
    
    ' If there was any error when deleting a file from given location then
    If Err.Number <> 0 Then
        
        ' Show message to user
        MsgBox "Error in deleting file for given location." & vbCrLf & vbCrLf & "Error " & Err.Number & " - " & Err.Description, vbCritical, "Saving document"
        
    End If
    
    Err.Clear
    
End Sub

[ vojvoda1010 @ 06.08.2018. 21:05 ] @
sad radi, to je to.

pokusao sam sto bolje da objasnim, ali izgleda da nisam, googlao sam i mislio sam da je taj vba to, ali ocigledno nije bio.

hvala bokinet
[ bokinet @ 06.08.2018. 21:13 ] @
Nema na cemu. Nadam se da vrsi posao.
Ako jos nesto ustreba, pisi kao tiket ili na pm slobodno.
Ja kad stignem i uhvatim vremena ako mogu rado cu izaci u susret i pomoci novim snagama u IT.
Ziveli.
[ vojvoda1010 @ 07.08.2018. 18:27 ] @
nisam nasao na forumu temu za pdf.

da li postoji mogucnost rename otvorenog pdf?
[ bokinet @ 08.08.2018. 13:09 ] @
Rad sa PDF fajlovima nije bas isti kao sto se moze raditi u MS Office kroz VBA posto generalno Adobe nema podrska za VBA.

Ako hoces isti princip kao sto si hteo u wordu tesko da je moguce izvesti kroz VBA.

Recimo ako koristis Adobe Acrobat, znam da je pre moglo (nisam skorije nesto po tom pitanju radio) kroz JavaScript da pises kod koji bi mogao da se koristi u Adobe Acrobat i sl.
U nastavku imas js developer guide od Adobe gde mozes da vidis sta je moguce.

js developer guide

U svakom slucaju treba naci poslednji Adobe Acrobat SDK pa videti kako stoje sada stvari.

Dodato:

Evo i linka ka Adobe download cenutr u vezi gore pomenute price:
Adobe download center



[Ovu poruku je menjao bokinet dana 08.08.2018. u 14:20 GMT+1]
[ vojvoda1010 @ 17.08.2018. 18:53 ] @
pokazuje mi dve greske:

pri snimanju imenujem npr. 271.18

i krene da snimi i izbaci



Error in deleting file for given location.

Error 70 - Permission denide.


i nekada


Error in deleting file for given location.

Error 52- Bad file name or number.
[ bokinet @ 17.08.2018. 20:58 ] @
1. Snimanje file-a sa navedenim nazivom 271.18
Problem je sto se parsuje naziv i skida ekstenzija file-a. Posto u nazivu file-a postoji tacka onda uneti naziv file-a postaje 271 a ekstenzija 18. Znaci 271.18 je file sa ekstenzijom 18 gde je onda ime file-a 271 bez 18.
U nastavku je primer kako to moze da se resi. Dodaje se na naziv file-a ekstenzija vec snimljenog file-a i izmedju naziva file-a i ekstenzije file-a tacka.
Takodje su mi potrebne dodatne informacije o privilegijama User koji rad sa tim file-om kao i naziv i lokacija file - vidi dole na kraju predlog oko debug dela.

Primer resenja je (samo ispravljeni red u kodu):
Code:


    ' Create filename with full location where will be saved
    SaveAsFilename = strDocPath & strNewDocName & "." & strDocExt



2. Problem koji se desava prilikom brisanja file-a je sto ili naziv file-a nije dobar ili je losa putanja ili je 'zakljucan' od strane OS ili nema privilegija za brisanje ili su atributi za file takvi da nije moguce obrisati isti.
Takodje ako su veliki fileovi u pitanju, isto proces sniamanja moze da potraje te tako isto i to moze da bude problem - zbog angazovanih resursa (kopira se postojeci file a dok proces jos traje ili jos se nije spustio na disk, pocinje proces brisanja).
S' tim u vezi dodao sam f-ju koja isto sluzi za brisanje file-ova ali koristeci FileSystemObject. Dole u nastavku je ceo kod, koji koristi i poziva tu f-ju. Ostavio sam i stari nacin...
Takodje su mi potrebne dodatne informacije o privilegijama User koji rad sa tim file-om kao i naziv i lokacija file - vidi dole na kraju predlog oko debug dela.

3. Takodje promenjen je redosled u prvom delu koda za deo kada se kreira naziv postojeceg file-a bez ekstenzije, koji je napravljen na osnovu tvog prvobitnog koda. Ta linija sada ispod uslova za proveru putanje kako bi se izbegla greska koja se javlja kada file nije postojeci tj. nije snimljen.


Kompletan kod u nastavku

Code:


' Delete file using FileSystemObject
Private Function DeleteFile(ByVal Filename As String) As Boolean

    On Error Resume Next

    Dim xFSO As Object
    
    ' Create new instance of object
    Set xFSO = CreateObject("Scripting.FileSystemObject")
    
    ' Return value
    DeleteFile = True
    
    ' Delete file
    xFSO.DeleteFile Filename
    
    If Err.Number <> 0 Then
        
        ' Return value
        DeleteFile = False
    
        ' Show message
        MsgBox "Error in deleting file for given location." & vbCrLf & _
               "File: " & Filename & vbCrLf & vbCrLf & _
               "Error " & Err.Number & " - " & Err.Description, vbCritical, "Saving document"
        
        Debug.Print "Error deleting file for given filename:", Filename
        
        Err.Clear
        
    End If
    
    ' Free memory resource
    Set xFSO = Nothing

End Function

Sub RenameDocumentWithDate()

    Dim strDocName, strDocNameNoExten, strDocFullName, strDocPath As String
    Dim strNewDocName As String
    Dim SaveAsFilename As String

    ' Get the current doc name
    strDocName = ActiveDocument.Name
    
    ' Get current full filename
    strDocFullName = ActiveDocument.FullName
    
    ' Get current filename path only
    strDocPath = ActiveDocument.Path
    
    ' Get current filename extension - since can be 3 or 4 char. len e.g. filename.doc || filename.docx  ...
    strDocExt = Right(strDocName, Len(strDocName) - InStrRev(strDocName, "."))
    
    ' Old > strDocNameNoExten = Left(strDocName, Len(strDocName) - 5)
    
    ' If Document path isn't set then
    If strDocPath = "" Then
        
        ' Show messagebox to user
        MsgBox ("This document hasn't been saved. You can't rename it.")
        Exit Sub
        
    End If

    ' Set current filename without extension
    strDocNameNoExten = Left(strDocName, Len(strDocName) - (Len(strDocExt) + 1))

    ' Pop up an input box for new name.
    ' Old > strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocName)
    strNewDocName = InputBox("Enter a new name for this document:", "Rename document", strDocNameNoExten)
    
    ' If new filename isn't set then exit
    If Len(Trim(strNewDocName)) = 0 Then
        
        ' Show messagebox to user
        MsgBox ("Name of this document hasn't been set. You can't save it.")
        Exit Sub
        
    End If
    
    ' If filename is same and already exists
    If LCase(strNewDocName) = LCase(strDocNameNoExten) Then
        
        ' If current file already exists then
        If Dir(strDocFullName) <> "" Then
            
            ' Show messagebox to user
            MsgBox ("You can't use same name of file for saving." & vbCrLf & "Please try again by entering a diffrent filename.")
            Exit Sub

        End If
        
    End If
    
    ' If backslash isn't present on the end of path then add it
    If Right(strDocPath, 1) <> "\" Then strDocPath = strDocPath & "\"
    
    ' Create filename with full location where will be saved
    SaveAsFilename = strDocPath & strNewDocName & "." & strDocExt
    
    Debug.Print "Document name:", strDocName
    Debug.Print "Document name without ext.:", strDocNameNoExten
    Debug.Print "Document full name:", strDocFullName
    Debug.Print "Document path:", strDocPath
    Debug.Print "New document name:", strNewDocName
    Debug.Print "Save document as filename:", SaveAsFilename
    
    ' Check MS Word version
    ' Word versions are 15 - 2013, 14 -> 2010, 12 - 2007, 11 - 2003
    ' If MS Word version is newer then MS Word 2007 then
    If Val(Application.Version) > 12 Then
        
        
        ' Old > ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
        ' ActiveDocument.SaveAs2 FileName:=strDocPath & "\" & strNewDocName
        
        ' Save current document with new filename
        ActiveDocument.SaveAs2 Filename:=SaveAsFilename
        
        
    ' If MS Word version is 2007 or older then
    Else
    
        
        ' Old > ActiveDocument.SaveAs FileName:=strDocPath & "\" & strDocNameNoExten & " " & strDate
        ' ActiveDocument.SaveAs FileName:=strDocPath & "\" & strNewDocName
        
        ' Save current document with new filename
        ActiveDocument.SaveAs Filename:=SaveAsFilename
    
    End If
    
    On Error Resume Next
    
    ' Solution 1: Delete file using built in KILL
    
    ' Delete current (original) file
    'Kill strDocFullName
    
    ' If there was any error when deleting a file from given location then
    'If Err.Number <> 0 Then
        
        ' Show message to user
        'MsgBox "Error in deleting file for given location." & vbCrLf & vbCrLf & "Error " & Err.Number & " - " & Err.Description, vbCritical, "Saving document"
        
        'Err.Clear
        
    'End If
    
    
    ' Solution 2: Delete file using FileSystemObject and internal function call
    
    ' Call function to delete original file
    DeleteFile strDocFullName
        
    
    
End Sub




Takodje kada se daju informacije o gresci, ne bi bilo lose da se daju i sve vrednosti koje su bile u kodu u momentu pojavljivanja greske.
Na primer deo koji se pojavljuje u DEBUG prozoru tj. IMMEDIATE delu. - U VBA se otvara se sa CTRL + G ili preko menu VIEW pa IMMEDIATE WINDOW.
Evo konkretnog primera odatle:

Code:


Document name:              Doc1.docx
Document name without ext.: Doc1
Document full name:         C:\Users\VBAUser\Desktop\Doc1.docx
Document path:              C:\Users\VBAUser\Desktop\
New document name:          271.18
Save document as filename:  C:\Users\VBAUser\Desktop\271.18.docx

Document name:              Doc1.docx
Document name without ext.: Doc1
Document full name:         E:\Doc1.docx
Document path:              E:\
New document name:          271.18
Save document as filename:  E:\271.18.docx



p.s. Takodje ako i dalje bude bilo problema oko brisanja file-a nakon snimanja istog pod drugim imenom, onda bi trebalo pokusati sa dodavanjem koda koji bi setovao file atribute pre brisanja i eventualno sinhronizovanog dela - snumanje sadrzaja pa brisanje fiile-a.




[Ovu poruku je menjao bokinet dana 17.08.2018. u 22:23 GMT+1]
[ vojvoda1010 @ 27.08.2018. 16:44 ] @
za sada radi.

zahvaljujem bokinet.

jedno obavestenje za preimenovanje otvorenog pdf file ima jedan pdf njegov naziv sumatraPDF.

Takodje bih pitao da li moze kojim slucajem da se preimenuje na cirilicu naziv file, preko koda sam probao ali vidim da ne moze.
[ bokinet @ 27.08.2018. 16:58 ] @
Moze da se koristi cirilica i latinica ali mora da se odrade podesavanja u sistemski parametrima.
Samo jedno pismo u isto vreme moze da se koristi (ili cirilica ili latinica).

Control Panel -> Region and Language
U 'Administrative' tab, sekcija 'Language for non-Unicode programs', kliknuti na dugme 'Change system locale...'
Odabrati 'Serbian (Cyrlic, Serbia)
Primeniti promene i resetovati racunar.
Na isti nacin ide i za Serbian (Latin, Serbia)
Samo jedan kodni raspored moze da se koristi u isto vreme a ne vise.
Napomene: U zavisnosti od verzije Windows-a mozda ce Windows traziti i instalacioni medium (obicno Windows XP i starije verzije) kako bi iskopirao potrebne file-ove.

[Ovu poruku je menjao bokinet dana 27.08.2018. u 18:27 GMT+1]
[ vojvoda1010 @ 27.08.2018. 18:57 ] @
to je to.
zahvaljujem bokinet
[ bokinet @ 27.08.2018. 19:49 ] @
Nema na cemu. Ziveli i svako dobro.
[ vojvoda1010 @ 08.12.2018. 11:40 ] @
opet imam problem da izbrise dokuemnt koji se reimenuje,

pojavljuje se greska

Error in deleting file for given location.

Error 70 - Permission denied
[ vojvoda1010 @ 08.12.2018. 12:27 ] @
Problem se javlja kod rename doc. a ne kod docx.

da li moze da se napise i za jedan tip i za drugi tip file?