[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Export in Word: Textmark doesn't exist

Posted on 2003-10-21
6
Medium Priority
?
354 Views
Last Modified: 2008-03-10
I do have a form with a button to export adress into a word.dot. opening the .dot works all fine. but by placing "Name" into the word-textmark "Name", i get an error saying, that the textmark does not exist. what is wrong on my code?

 oApp.Documents.Add Template:="X:\Vorlagen\Accessbrief.dot", NewTemplate:=False, DocumentType:=0
   
    'zu Textmarke springen und Namen einfügen
   
    Set Bereich = oApp.ActiveDocument.GoTo(What:=GotoBookmark, Name:="name")
    Bereich.InsertAfter Forms!Adressanzeige!name

thx
ColumA        
0
Comment
Question by:ColumA
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Ashen_Shugar
ID: 9590545

Have you tried renaming the TextMark in case Name is a reserved word?




Stephen
0
 

Author Comment

by:ColumA
ID: 9590597
Yes, Stephen, have tried several txtmarkwords.
0
 
LVL 12

Expert Comment

by:Paurths
ID: 9590621
hi, what happens if u give it a try like this:

Set Bereich = oApp.ActiveDocument.GoTo("name").Range
Bereich.InsertAfter Forms!Adressanzeige!name
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ColumA
ID: 9590728
Hi Paurths

With your solution, I get runtime-error 4120 "Wrong Parameter".

0
 
LVL 12

Accepted Solution

by:
Paurths earned 300 total points
ID: 9596728
oops... made an error, sorry
"GoTo" should be replaced by "Bookmarks"

try this


Set Bereich = oApp.ActiveDocument.Bookmarks("name").Range
Bereich.InsertAfter Forms!Adressanzeige!name
0
 

Author Comment

by:ColumA
ID: 9596953
gotcha. thank you Paurths.

Rgds
ColumA
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question