Certain properties of a Document that I can't find.

M

Marketware

I have a document that I have saved with the email fields in place (by
selecting Send To...Mail Recipient) i.e., Subject: Attachments, etc.

How can I get access to these fields in Code? (The idea here is that I'm
creating an Email form document with mail merge fields, and will process
these forms to outlook later by merging the fields with our SQL database).

Also, what property tells me the format of the document? i.e., HTML or Rich
Text. And then based on the format what property will give me the
appropriate HTML code and or rich text when I want to use the document?

Thanks!!

bob
 
D

Doug Robbins - Word MVP

Using mail merge, it is not possible to save the name of the merge field
that contains the email addresses or the subject of the email or that the
document is to be sent as an attachment.

What you could however do is save these items as variables in the document
and later retrieve them when you want to use them.

ActiveDocument.Variables("varemailaddressfield") = [mergefieldname]

etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
M

Marketware

I don't think I correctly communicated what I meant. When you click Send To
on the File menu, Word displays a region at the top of the document that
allows you to put in the To; Cc;Bcc; Subject and also to Add Attachments.
This information IS saved in the document.

My question is...how can I access these values in code? Thank you again.



Doug Robbins - Word MVP said:
Using mail merge, it is not possible to save the name of the merge field
that contains the email addresses or the subject of the email or that the
document is to be sent as an attachment.

What you could however do is save these items as variables in the document
and later retrieve them when you want to use them.

ActiveDocument.Variables("varemailaddressfield") = [mergefieldname]

etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Marketware said:
I have a document that I have saved with the email fields in place (by
selecting Send To...Mail Recipient) i.e., Subject: Attachments, etc.

How can I get access to these fields in Code? (The idea here is that I'm
creating an Email form document with mail merge fields, and will process
these forms to outlook later by merging the fields with our SQL database).

Also, what property tells me the format of the document? i.e., HTML or
Rich
Text. And then based on the format what property will give me the
appropriate HTML code and or rich text when I want to use the document?

Thanks!!

bob
 
D

Doug Robbins - Word MVP

I believe that you are mistaken. That information is not saved in the
document.

However, see the article "Mail Merge to E-mail with Attachments" at:

http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm

which might enable you to do what you are after.

which might give you some ideas
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Marketware said:
I don't think I correctly communicated what I meant. When you click Send
To
on the File menu, Word displays a region at the top of the document that
allows you to put in the To; Cc;Bcc; Subject and also to Add Attachments.
This information IS saved in the document.

My question is...how can I access these values in code? Thank you again.



Doug Robbins - Word MVP said:
Using mail merge, it is not possible to save the name of the merge field
that contains the email addresses or the subject of the email or that the
document is to be sent as an attachment.

What you could however do is save these items as variables in the
document
and later retrieve them when you want to use them.

ActiveDocument.Variables("varemailaddressfield") = [mergefieldname]

etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Marketware said:
I have a document that I have saved with the email fields in place (by
selecting Send To...Mail Recipient) i.e., Subject: Attachments, etc.

How can I get access to these fields in Code? (The idea here is that
I'm
creating an Email form document with mail merge fields, and will
process
these forms to outlook later by merging the fields with our SQL
database).

Also, what property tells me the format of the document? i.e., HTML or
Rich
Text. And then based on the format what property will give me the
appropriate HTML code and or rich text when I want to use the document?

Thanks!!

bob
 
M

Marketware

The data is located in the document (I viewed the raw data in the file), but
I'm guessing from your response you don't know how to access it either. Oh
well, unless there's a simple way to access the subject and attachments in
code I'll have to create an add-in to create my own subject and prompt for my
own attachments.

You see my goal is to use Word to create Email "forms" much like form
letters (mail merge letters), then when the user wants to use the form from
my application, open the "form" in code, and merge data into the form, and
then give the user the ability to make any changes, etc. and then manually
send the email from outlook (with all the tools available in outlook like
meeting invitations, etc.).

I also plan on using these same forms for "bulk" emailings where I'll merge
and send the "form" to multiple contacts based on an SQL query.

The key here is that I want to use Word and all that Word can do, to create
the form (including the ability to insert pictures, etc.)

Do you have any thoughts as to how I could access in code these properties
that seem to be hidden? (I'd love to avoid creating an add-in).

bob

Doug Robbins - Word MVP said:
I believe that you are mistaken. That information is not saved in the
document.

However, see the article "Mail Merge to E-mail with Attachments" at:

http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm

which might enable you to do what you are after.

which might give you some ideas
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
Marketware said:
I don't think I correctly communicated what I meant. When you click Send
To
on the File menu, Word displays a region at the top of the document that
allows you to put in the To; Cc;Bcc; Subject and also to Add Attachments.
This information IS saved in the document.

My question is...how can I access these values in code? Thank you again.



Doug Robbins - Word MVP said:
Using mail merge, it is not possible to save the name of the merge field
that contains the email addresses or the subject of the email or that the
document is to be sent as an attachment.

What you could however do is save these items as variables in the
document
and later retrieve them when you want to use them.

ActiveDocument.Variables("varemailaddressfield") = [mergefieldname]

etc.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
I have a document that I have saved with the email fields in place (by
selecting Send To...Mail Recipient) i.e., Subject: Attachments, etc.

How can I get access to these fields in Code? (The idea here is that
I'm
creating an Email form document with mail merge fields, and will
process
these forms to outlook later by merging the fields with our SQL
database).

Also, what property tells me the format of the document? i.e., HTML or
Rich
Text. And then based on the format what property will give me the
appropriate HTML code and or rich text when I want to use the document?

Thanks!!

bob
 

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