Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
angela31 Profile
Femeie
24 ani
Buzau
cauta Barbat
24 - 60 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [OUTLOOK] Insert Specific Text at Cursor Position [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 739
Go to VBA editor (ALT+F11), Tools - References and enable Microsoft Word XY.0 Object Library.

Create a new module and paste the following code:



Sub Insert_Specific_Text()

Dim objDoc As Word.Document
Dim objSel As Word.Selection

On Error Resume Next

' get a Word.Selection from the open Outlook item
Set objDoc = Application.ActiveInspector.WordEditor
Set objSel = objDoc.Windows(1).Selection

' now do what you want with the Selection
objSel.InsertBefore Format("Confirmed bla bla bla bla bla") 'you can insert today with: Format(Now, "DD.MM.YYYY")

Set objDoc = Nothing
Set objSel = Nothing

End Sub


Put the above macro in a new message's QAT.


pus acum 3 ani
   
Pagini: 1  

Mergi la