Outlook Signature

A

A+P

I'm running Office Outlook 2003 Pro Sp2.

In the Microsoft Visual Basic Editor, how do I get a signature name property
that's already been entered and saved under Outlook Tools|Options|Mail
Format>Signatures?

Paul
 
A

A+P

Hi Michael,

I couldn't get Word to start using the following code from Outlook. What am
I missing?
Set wrdApp = GetObject(, "Word.Application")
Set wrdDoc = wrdApp.Documents.Add()

I also couldn't figure out how to retrieve the value in the
EmailOptions.EmailSignature entry called *PickUpMailSig" from within Word.

So I created an AutoTextEntry so I can insert the signature:

returnValue =
wrdApp.Activedocument.AttachedTemplate.AutotextEntries("*PickUpMailSig").Value

But the above code only works when Word is already opened. But when Word is
not opened, it doesn't work.

Any thoughts?

Paul
 
A

A+P

Hi Michael,

I tried the following and Word still doesn't launch. Any other thoughts?

Set wrdApp = GetObject(, "Word.Application")
If wrdApp Is Nothing Then
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Add()
End If

Paul
 
M

Michael Bauer [MVP - Outlook]

A

A+P

Hi Michael,

Thanks for wrdApp.Visible=true. That showed me when Word is running and
when it isn't.
Apparently the signature I'm trying to retrieve from Word only works if I
launch another Word session.
Even if there's a Word session opened, the following statement could not
retrieve the signature I called *PickUpMailsig:

wrdApp.Activedocument.AttachedTemplate.AutotextEntries("*PickUpMailSig").Value

So now my code looks like this with the GetObject statement commented out:
' Launch Word application
' Set wrdApp = GetObject(, "Word.Application")
If wrdApp Is Nothing Then
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Add()
End If
returnValue =
wrdApp.Activedocument.AttachedTemplate.AutotextEntries("*PickUpMailSig").Value

Thanks again for your help.

Paul
 

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