Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Titulo de la primera linea word a pdf

publicado

Hola:

Respondiendo a este post:

Hola! Alguien sabe como puedo crear una macro en word para guardar un documento en pdf cuyo nombre sea la primera linea del word?

el proceso que realizo siempre es: en un documento en blanco nuevo, pego la informacion que quiero y ejecuto una macro, que cambia el formato y otras muchas cosas. ahora quiero completarla guardando el documento en pdf, con el nombre de la primera linea.

he hecho una macro pero el nombre del pdf resultante es siempre el mismo, es decir, no es el de la primera linea.

Alguien puede decirme cómo se hace eso, si se puede?

Muchas gracias.

https://www.ayudaexcel.com/foro/threads/renombrar-archivo-word-con-macro-titulo-en-la-primera-linea.36187/#post-175982

Sub GrabarApdf()
Dim titulo As Variant
Dim intLineas As Integer

Selection.HomeKey wdStory
intLineas = Selection.HomeKey & Selection.EndKey

For i = 0 To intLineas

Set titulo = ActiveDocument.Range(Start:=0, End:=i)

Next i

titulo = Replace(titulo, Chr(13), "")

ActiveDocument.ExportAsFixedFormat OutputFileName:= _
ActiveDocument.Path & "\" & titulo & ".pdf", ExportFormat:= _
wdExportFormatPDF, OpenAfterExport:=True, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False

'ActiveDocument.Path & “” & ActiveDocument.Name & “.pdf”

End Sub
[/CODE]

Formato.rar

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.